• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Where will be a is a relationship will occur?

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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;}
 
Ranch Hand
Posts: 1090
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for idea...what I shoud preffer...
I hate not clear Qs....:-)
 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic