UML Diagrams MCQs Questions With Answers – Part 32
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. What does this arrow –|> indicate?

A A simple dependency
B Inheritance between components
C The component provides the IPaiement interface
D The component contains IPaiement
2. What mechanism allows adapting a UML model to different contexts using parameters?
A Profiles
B Stereotyped models
C Parameterized models
D Composite structures
3. You’re building a banking app. You want to show that a checking account and a savings account are types of bank accounts. What UML concept applies?
A Generalization
B Association
C Dependency
D Composition
4. In a state diagram, what does an entry action mean?
A An action performed when exiting the state
B An action executed if a guard is true
C An action executed every time the state is entered
D An action triggered only manually
5. What is the purpose of {invariant total >= 0}?

A To limit the number of orders
B To link two classes
C To indicate a default value
D To define an OCL (Object Constraint Language) constraint on objects
6. What does this “alt” block with “stock error” represent?

A To model an exception or alternate scenario
B To test attributes
C To perform a loop
D To display a secondary diagram
7. What does this state diagram model?

A Two independent states
B Transitions between classes
C An infinite loop
D A composite state containing its own substates
8. What is the role of the word “owns” here?

A It’s a class type
B It’s an attribute name
C It’s an association name describing the role of the relationship
D It’s a method
9. What does this structure model?

A A multiple composition
B An n-ary association between several classes
C A generic interface
D A composite state
10. What is the purpose of an association class?
A To associate two abstract classes
B To add attributes to a relationship between two classes
C To define a class without attributes
D To represent a multiple aggregation