Question d’entretien chez Iris Software

1) Diff between composition and aggregation

Réponses aux questions d'entretien

Utilisateur anonyme

6 mai 2019

Answered with the example of student,class and library.

Utilisateur anonyme

27 févr. 2020

Composition The composition is the strong type of association. An association is said to composition if an Object owns another object and another object cannot exist without the owner object. Consider the case of Human having a heart. Here Human object contains the heart and heart cannot exist without Human. Aggregation Aggregation is a weak association. An association is said to be aggregation if both Objects can exist independently. For example, a Team object and a Player object. The team contains multiple players but a player can exist without a team.