0
0
LLDsystem_design~5 mins

UML class diagrams basics in LLD - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a UML class diagram?
A UML class diagram is a visual representation that shows the structure of a system by displaying its classes, their attributes, methods, and the relationships between them.
Click to reveal answer
beginner
What are the three main parts of a UML class diagram box?
The three main parts are: 1) Class name at the top, 2) Attributes (properties) in the middle, 3) Methods (operations) at the bottom.
Click to reveal answer
beginner
What does an association relationship represent in a UML class diagram?
An association shows a connection between two classes, meaning objects of one class use or are linked to objects of another class.
Click to reveal answer
intermediate
What is the difference between inheritance and composition in UML class diagrams?
Inheritance means one class is a specialized version of another (is-a relationship). Composition means one class contains another class as a part (has-a relationship) and controls its lifecycle.
Click to reveal answer
intermediate
How is multiplicity shown in UML class diagrams and what does it mean?
Multiplicity is shown near the ends of association lines as numbers or ranges (e.g., 1, 0..*, *). It indicates how many instances of a class can be linked to instances of another class.
Click to reveal answer
Which part of a UML class diagram shows the class's functions?
AThe top compartment
BThe bottom compartment
CThe middle compartment
DOutside the box
What does a solid line with a hollow triangle arrow represent in UML?
AInheritance
BAssociation
CComposition
DDependency
If a class 'Car' has a composition relationship with 'Engine', what does it mean?
ACar uses Engine temporarily
BCar is a type of Engine
CCar contains Engine and controls its lifecycle
DCar and Engine are unrelated
What does multiplicity '0..*' mean in a UML association?
AExactly zero instances
BOne instance only
CAt least one instance
DZero or many instances
Which UML diagram focuses on showing classes and their relationships?
AClass diagram
BUse case diagram
CSequence diagram
DActivity diagram
Describe the main components of a UML class diagram and their purpose.
Think about the box parts and how classes connect.
You got /4 concepts.
    Explain the difference between inheritance and composition with simple examples.
    Use real-life objects like animals or cars.
    You got /3 concepts.