← Quiz: UML Class Diagrams: all 10 questions
Quiz: UML Class Diagrams · Question 6 of 10
House ◆—— Room (filled diamond at House). Which Java design matches?
House ◆—— Room (filled diamond at House). Which Java design matches?
- A.Rooms are created elsewhere and passed to the house
- B.The House creates its Room objects itself, and they are not shared
- C.Room extends House
- D.House is a parameter of a Room method only
Answer & explanation
Correct answer: The House creates its Room objects itself, and they are not shared
A filled diamond is composition: the whole owns and creates its parts.
Can you get the rest right without peeking?
Take the timed Quiz: UML Class Diagrams quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →