Hi all, The answers given are 4 & 5.Why not 3..i dont understand why 4 is the answer. Vandanam, vijay 6). Which two demonstrate a "has a" relationship? (Choose two.) 1.public interface Person{ } public class Employee extends Person{ } 2.public interface Shape{ } public interface Rectangle extends Shape{ } 3.public interface Colorable{ } public class Shape implements Colorable{ } 4.public class Species{ } public class Animal{private Species species;} 5.interface Component{ } class Container implements Component{ private Component[] children; }
vadiraj vd
Ranch Hand
Joined: Dec 15, 2000
Posts: 68
posted
0
3.public interface Colorable{ } public class Shape implements Colorable{ } 4.public class Species{ } public class Animal{private Species species;} 5.interface Component{ } class Container implements Component{ private Component[] children; }
Hi Vijay, In 3 there's "is a" relationship : Shape is a Colorable. In 4 there's "has a" relationship : Animal has a Speices, although meaning-less. Hope this helps,
------------------ Regards --------- vadiraj
***************** There's a lot of I in J. *****************
Regards<BR>---------<BR>vadiraj<P><BR>*****************<BR>There's a lot of I in J.<BR>*****************