🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Object Relationships: all 10 questions

Quiz: Object Relationships · Question 1 of 10

A Library has Books; if the library closes, the books can go to another library. This is:

A Library has Books; if the library closes, the books can go to another library. This is:

  1. A.Composition
  2. B.Aggregation
  3. C.Inheritance
  4. D.Polymorphism
Answer & explanation

Correct answer: Aggregation

The parts (books) can exist without the whole — aggregation.

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 →