What is the difference between composition and Aggregation give an example?

Aggregation implies a relationship where the child can exist independently of the parent . Example: Class (parent) and Student (child). Delete the Class and the Students still exist. Composition implies a relationship where the child cannot exist independent of the parent.

Sizin İçin Seçtik  What is composition and aggregation in Java with example?

Leave a Reply

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