Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HAS-A-Relationship (K&B)

 
Sasha Ruehmkorf
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From K&B selftest of chapter 2:
Has-a relationships always rely on instance variables.
is the correct answer

From K&B BonusExam, question 52:
Has-a relationships are always defined with instance variables
is false, as
class variables can also be used to define has-a relationships


Could someone plaese clarify?
(Searching the web just confused me more... :-( )
 
Chandra Bhatt
Ranch Hand
Posts: 1710
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Discussed here


Thanks,
 
Sasha Ruehmkorf
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, but that topic is about is-a relationships. I don't see the connection.
 
Chandra Bhatt
Ranch Hand
Posts: 1710
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sasha,

You are right, Has-A Relationship can also be acquired using class variables.


Thanks,
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic