In Aggregation, do the part and the whole survive independently?

Get ready for your Object‑Oriented Programming Test. Use flashcards and multiple-choice questions. Each question includes hints and explanations. Prepare for your exam today!

Multiple Choice

In Aggregation, do the part and the whole survive independently?

Explanation:
Aggregation describes a loose has-a relationship where lifecycles are separate. In this setup, the part can exist even if the whole is gone, and the whole does not manage the part’s destruction. Think of a Team and its Players: players can exist outside a specific team and may move between teams over time. If the team is dissolved, the players still exist. This shows that the part’s existence isn’t bound to the whole, which is why they can survive independently. So, the best answer reflects that independence of lifecycles in aggregation.

Aggregation describes a loose has-a relationship where lifecycles are separate. In this setup, the part can exist even if the whole is gone, and the whole does not manage the part’s destruction.

Think of a Team and its Players: players can exist outside a specific team and may move between teams over time. If the team is dissolved, the players still exist. This shows that the part’s existence isn’t bound to the whole, which is why they can survive independently.

So, the best answer reflects that independence of lifecycles in aggregation.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy