aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes  Where will be a is a relationship will occur? 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 " Where will be a is a relationship will occur?" Watch " Where will be a is a relationship will occur?" New topic
Author

Where will be a is a relationship will occur?

Bruno Korcinski
Greenhorn

Joined: Jun 03, 2003
Posts: 16
Hi guys !
I'm really confused with this Q.
Do you have idea?
Thanks.
Igor.
Where will be a is a relationship will occur select one?
A. interface Person
class Employee implements Person
B. interface Shape
interface Rectangle extends Shape

C. interface Component
class Objects implements Component
{Component [] Component;}
Anupam Sinha
Ranch Hand

Joined: Apr 13, 2003
Posts: 1088
Hi Igor
Actually all of them have a "is a" relationship. But it appears that they want answer B to be the correct one because it extends a class while others implements an interface.
Bruno Korcinski
Greenhorn

Joined: Jun 03, 2003
Posts: 16
thanks for idea...what I shoud preffer...
I hate not clear Qs....:-)
Suresh Selvaraj
Ranch Hand

Joined: Nov 14, 2000
Posts: 104
Answer choice B is correct.
"is a " relationship exists when a subclass extends the behaviour of a Super class or if an interface extends another interface.
interface Rectangle extends Shape - reflects "is a " type of relationship.
"like a " relationship exists when a class implements an interface.
Hence, answer choices A and C reflect "like a" type of relationship.


Suresh Selvaraj, (author of JQuiz)<br />SCJP2<br /><a href="http://www.decontconsulting.com" target="_blank" rel="nofollow">www.decontconsulting.com</a>
Anupam Sinha
Ranch Hand

Joined: Apr 13, 2003
Posts: 1088
Hi Suresh
But this sounds quite wierd "Employee is not a person." but "Employee is like a person". Is this documented anywhere.

Well anyways companies should treat their employee as a person not like a person.
[ June 24, 2003: Message edited by: Anupam Sinha ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Where will be a is a relationship will occur?