posted 20 years ago
Given:
10. class A {}
11. class B {
12. private A myA = new A();
13. }
Which two statements are true about the relationship between class A and class B? (Choose two.)
A
A maintains no relationship with B
B
B maintains no relationship with A
C
B maintains a "one to many" relationship with A
D
The relationship can be described with a has-a clause
E
The relationship can be described with an is-a clause
The answer is A and D. I agree with D. But how is A true? A relationship takes two entities. If B has a "has" relationship with A, then A also has a "part of" relationship with B.