- Association-Structural connection between the objects is shown by association. There are 3 types of association binary, Unary & n-ary.
- Following is example of binary association.
2. Unary Assoication
3. N-ary association.
- Aggregation- "Whole-part" relationship but no lifetime control implied
- Composition- Composition is having sole responsibility of creation and destruction. Composition is a strong form of Aggregation.
There are two main differences between composition and aggregation-
1. In composition if whole is destroyed, so are the instances of the parts.
2. A class can only belong to one composition relationship at a time as a part.