File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Where will be a is a relationship will occur?

 
Bruno Korcinski
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1090
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for idea...what I shoud preffer...
I hate not clear Qs....:-)
 
Suresh Selvaraj
Ranch Hand
Posts: 104
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Anupam Sinha
Ranch Hand
Posts: 1090
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic