Why do we use Aggregation in OOP?

Aggregation acknowledges that the two classes have their own life cycle (i.e. can exist without each other). Each object is instantiated separately. In the example of a hand of cards, the cards will already exist before they are added to a Hand class.

Sizin İçin Seçtik  Why do you need Aggregation?

Leave a Reply

Your email address will not be published. Required fields are marked *