0
0
Software Engineeringknowledge~5 mins

Class diagrams in Software Engineering - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a class diagram in software engineering?
A 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
Name the three main parts of a class box in a class diagram.
The three main parts are: 1) Class name at the top, 2) Attributes (properties) in the middle, 3) Methods (functions) at the bottom.
Click to reveal answer
beginner
What does an association relationship represent in a class diagram?
An association shows a connection or link between two classes, indicating that objects of one class use or communicate with objects of another class.
Click to reveal answer
intermediate
Explain the difference between inheritance and composition in class diagrams.
Inheritance means one class (child) inherits attributes and methods from another class (parent), showing an 'is-a' relationship. Composition means one class contains another class as a part, showing a 'has-a' relationship where the part cannot exist independently of the whole.
Click to reveal answer
beginner
Why are class diagrams useful in software development?
Class diagrams help developers understand and plan the system's structure clearly. They make it easier to communicate ideas, design the system, and find errors early before coding.
Click to reveal answer
Which part of a class diagram shows the functions a class can perform?
AAttributes section
BRelationship section
CClass name section
DMethods section
What type of relationship in a class diagram represents 'is-a'?
AAssociation
BAggregation
CInheritance
DComposition
In a class diagram, what does a solid diamond at one end of a line represent?
AComposition
BAggregation
CInheritance
DAssociation
Which of the following is NOT typically shown in a class diagram?
AClass methods
BObject state changes over time
CClass attributes
DRelationships between classes
What does an open arrowhead on a line between classes usually indicate?
AInheritance
BAggregation
CDependency
DAssociation
Describe the main components of a class diagram and explain their purpose.
Think about how a class is shown and what information it holds.
You got /5 concepts.
    Explain how inheritance and composition differ in class diagrams and give a real-life example for each.
    Consider 'is-a' vs 'has-a' relationships.
    You got /4 concepts.