Composition vs. AssociationRules of Thumb
Physically embedded vs. references:
- the parts are physically embedded within the composite object
- objects are associated by means of references
Visibility:
- the part is visible for the composite object only
- the visibility of the associated object is public
Life Time:
- the composite object creates and deletes its parts
- there is no existential dependency between associated objects
Copy Semantics:
- composite objects and parts are copied together
- only the references to associated objects are copied