UML Diagrams MCQs Questions With Answers – Part 20
Test your knowledge and boost your confidence with these multiple-choice quizzes focused on UML diagrams, foundational software engineering concepts, and real-world best practices. Designed for students, developers, and exam candidates, these MCQs offer a quick and effective way to assess your understanding and sharpen your skills.
1. If a “Flying Interface” defines the behavior of “flying”, and an “Airplane” implements this capability, what UML relationship is at play?
A Generalization (the airplane is a type of flying)
B Dependency (the airplane needs the concept of flying)
C Realization (the airplane realizes the ability to fly)
D Association (airplanes and flying exist together)
2. What is the role of stereotypes (<< >>) in UML?
A Add comments to a UML diagram.
B Modify the behavior of a class at runtime.
C Extend the UML vocabulary to add domain-specific meanings.
D Define the primitive data types used in UML.
3. What is the role of an alt combined fragment in a sequence diagram?
A Represent parallel interactions.
B Represent an iteration of a message.
C Represent a set of alternative conditions (like if…else).
D Represent a recursive message call.
4. In a UML activity diagram, what is the difference between a fork and a join?
A The fork splits a flow, the join ends it.
B The fork synchronizes flows, the join splits them.
C The fork splits a flow into multiple parallel flows, the join synchronizes them.
D There is no difference, they are two names for the same symbol.
5. Imagine a “Conductor” who uses a “Baton” to direct music. How does UML capture this temporary usage?
A Composition (they are a single musical entity)
B Aggregation (they often work together)
C Association (they exist in the same musical world)
D Dependency (the act of conducting uses the wand)
6. To visualize the “drawers” and “shirts” inside a “Dresser”, showing that the drawers are contained within the dresser, which UML structural diagram is relevant?
A Object diagram (a specific dresser with its contents)
B Class diagram (types of dressers and drawers)
C Component diagram (software parts of a smart dresser)
D Deployment diagram (where the dresser is placed in the house)
7. Which UML design pattern is most often modeled with an association between a class and itself?
A Observer
B Singleton
C Composite
D Factory
8. Which statement is true regarding an abstract class in a UML class diagram?
A It can be instantiated directly.
B It cannot have operations.
C It must inherit from another class.
D It usually contains abstract operations (not implemented).
9. What is the consequence of this relationship between Cart and Inventory?

A Cart and Inventory are subclasses that inherit from Stockable
B Stockable is a superclass of Cart and Inventory
C Cart and Inventory independently implement the Stockable interface
D Both classes must be combined into one class
10. You are modeling a messaging app. Which UML relationship represents that a user can send multiple messages?
A Dependency
B Composition
C Inheritance
D Association with multiplicity