Association vs Composition vs Aggregation
The key difference between association, composition, and aggregation is that composition and aggregation are two forms of association.

The key differences between composition and aggregation are given below:
Composition | Aggregation | |
---|---|---|
1 | Child will co-exist with the container class | Child can exist Independently |
2 | Part-of relationship. | Has-a relationship |
3 | Stronger form of association | Weaker form of composition |
4 | Can only have one-to-one and many-to-one relationship | Can have a one-to-one, many-to-one, one-to-many and many-to-many relationship |
5 | Composited objects cannot be changed from the referrer. | Aggregated objects can be removed or replaced by another same type of object. |