Hi, SAMPLE QUESTION 6: Which two demonstrate a "has a" relationship? (Choose two.) A.public interface Person{ } public class Employee extends Person{ } B.public interface Shape{ } public interface Rectangle extends Shape{ } C.public interface Colorable{ } public class Shape implements Colorable{ } D.public class Species{ } public class Animal{ private Species species;} E.interface Component{ } class Container implements Component{ private Component[] children;} Answer: D,E Mukti [This message has been edited by Mukti Bajaj (edited January 22, 2001).] [This message has been edited by Mukti Bajaj (edited January 22, 2001).]
Cindy Glass
"The Hood"
Sheriff
Joined: Sep 29, 2000
Posts: 8521
posted
0
An Employee is a Person. A Rectangle is a Shape. A Shape is Colorable. An Animal has a Species (in the species variable). A Container has a Component array called children.
"JavaRanch, where the deer and the Certified play" - David O'Meara