• 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

IS-A and HAS-A Relationship Doubts

 
Ranch Hand
Posts: 344
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
From web page

Select the three correct answers:
1. A Bar is a Baz
2. A Foo has a Bar
3. A Baz is a Foo
4. A Foo is a Baz
5. A Baz has a Bar

I have selected:
3. A Baz is a Foo
4. A Baz has a Bar

What will be the third one? I can't figure it out.. can anyone..
 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi John,
You have given wrong answer numbers 3 & 4. It is 3 & 5.

I think 2, 3, 5 are right options.
 
Ranch Hand
Posts: 381
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are only two correct answers 3 and 5.
 
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
2,4,5 are the answers.

[ December 11, 2006: Message edited by: Jothi Shankar Kumar Sankararaj ]
[ December 11, 2006: Message edited by: Jothi Shankar Kumar Sankararaj ]
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
2 3 and 5 are correct options.

2nd option is correct because Foo has a Baz and intern Baz has Bar which implies that Foo has Bar.

hope this clarifies 2 nd option is also correct
 
Vinayagar Karpagam
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1 --> Not correct --> Bar doesnt extends Baz
2 --> Correct --> Foo has a Baz & Baz has a Bar & Has-A is transitive.
3 --> Correct --> Baz extends Foo
4 --> Not correct --> Foo doesnt extend Baz
5 --> Correct --> Baz has a reference to Bar as a member.

So, 2,3, and 5 are the correct options.
 
Yeah, but is it art? What do you think tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic