← Quiz: Object Relationships: all 10 questions
Quiz: Object Relationships · Question 7 of 10
A House constructor creates its own Room objects and no other object holds them. Which relationship is this?
A House constructor creates its own Room objects and no other object holds them. Which relationship is this?
- A.Association
- B.Aggregation
- C.Inheritance
- D.Composition
Answer & explanation
Correct answer: Composition
The whole creates and owns the parts, and they go when the house goes.
Can you get the rest right without peeking?
Take the timed Quiz: Object Relationships quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →