Recall & Review
beginner
What is association in system design?
Association is a relationship where two objects know about each other and can interact, but neither owns the other. It's like two friends who can talk but live separately.
Click to reveal answer
beginner
Define aggregation with a real-life example.
Aggregation is a 'has-a' relationship where one object contains or uses another, but the contained object can exist independently. For example, a library has many books, but books can exist without the library.
Click to reveal answer
intermediate
What makes composition different from aggregation?
Composition is a strong 'part-of' relationship where the contained object cannot exist without the container. Like a house and its rooms: if the house is destroyed, rooms don't exist separately.
Click to reveal answer
intermediate
In UML diagrams, how is composition represented?
Composition is shown with a filled diamond shape at the container end connecting to the part, indicating strong ownership and lifecycle dependency.
Click to reveal answer
beginner
Explain why understanding these relationships is important in system design.
Knowing association, aggregation, and composition helps design clear object interactions, manage lifecycles properly, and build maintainable, scalable systems.
Click to reveal answer
Which relationship implies that the part can exist independently of the whole?
✗ Incorrect
Aggregation allows the part to exist independently, unlike composition where the part depends on the whole.
In which relationship does the lifecycle of the part depend entirely on the whole?
✗ Incorrect
Composition means the part cannot exist without the whole, so their lifecycles are tied.
What symbol represents aggregation in UML diagrams?
✗ Incorrect
Aggregation is shown with a hollow diamond at the container end.
Which relationship best describes two objects that interact but do not own each other?
✗ Incorrect
Association is a loose relationship where objects know each other but have no ownership.
If a car has an engine, and the engine cannot exist without the car, what is this relationship?
✗ Incorrect
The engine is part of the car and depends on it, so this is composition.
Describe the differences between association, aggregation, and composition with simple examples.
Think about friends, libraries with books, and houses with rooms.
You got /3 concepts.
Explain how understanding these relationships helps in designing software systems.
Consider how parts depend on wholes in real life.
You got /3 concepts.