| Author |
HAS-A-Relationship (K&B)
|
Sasha Ruehmkorf
Ranch Hand
Joined: Mar 29, 2007
Posts: 115
|
|
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
Joined: Feb 28, 2007
Posts: 1707
|
|
Discussed here Thanks,
|
cmbhatt
|
 |
Sasha Ruehmkorf
Ranch Hand
Joined: Mar 29, 2007
Posts: 115
|
|
|
Thanks, but that topic is about is-a relationships. I don't see the connection.
|
 |
Chandra Bhatt
Ranch Hand
Joined: Feb 28, 2007
Posts: 1707
|
|
Hi Sasha, You are right, Has-A Relationship can also be acquired using class variables. Thanks,
|
 |
 |
|
|
subject: HAS-A-Relationship (K&B)
|
|
|