Unit 4
Association, Aggregation and Composition
How objects work together: association, aggregation and composition, how to choose between them, UML class diagrams, and a mini-project that uses the whole module.
Objects rarely work alone. Classes are related to one another. These three relationships describe how objects are connected, and are different from inheritance (is-a). They are has-a or uses-a relationships.
What you will learn
After this unit you can:
- Distinguish association, aggregation and composition
- Choose the correct relationship for a scenario
- Implement each in code
- Draw simple class diagrams