• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

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 ]
 
Their achilles heel is the noogie! Give them noogies tiny ad!
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic