0
0
LLDsystem_design~5 mins

Relationships (association, aggregation, composition) in LLD - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
AAggregation
BComposition
CAssociation
DInheritance
In which relationship does the lifecycle of the part depend entirely on the whole?
AComposition
BAggregation
CDependency
DAssociation
What symbol represents aggregation in UML diagrams?
AFilled diamond
BHollow diamond
CArrow
DDashed line
Which relationship best describes two objects that interact but do not own each other?
AComposition
BAggregation
CAssociation
DGeneralization
If a car has an engine, and the engine cannot exist without the car, what is this relationship?
AAssociation
BAggregation
CDependency
DComposition
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.