GeeCON Prague 2014*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Help plz Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Help plz" Watch "Help plz" New topic
Author

Help plz

Vijayakumar Ramakrishnan
Greenhorn

Joined: Dec 16, 2000
Posts: 24
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

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>*****************
 
GeeCON Prague 2014
 
subject: Help plz