UML Diagrams MCQs Questions With Answers – Part 21
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. In a UML activity diagram, what does a guard condition represent?
A A logical test applied before an event occurs.
B A condition that decides if an activity is accepted in a workflow.
C A constraint written in brackets [ ] on a transition, used to determine the path to follow.
D A loop of activities repeated indefinitely.
2. In an activity diagram, what does a diamond with several outgoing arrows represent?
A A loop
B A conditional decision
C A terminal state
D A subprocess
3. You want to model the repeated execution of an action (e.g., login attempt). Which combined fragment should you use?
A opt
B alt
C loop
D ref
4. What is the difference between a synchronous and an asynchronous message in a UML sequence diagram?
A A synchronous message never returns a response.
B An asynchronous message blocks the sender until it receives a reply.
C A synchronous message waits for a response; an asynchronous one does not.
D There is no difference in UML.
5. This diagram represents __________

A A relationship between objects in the same program
B Software components and their interactions in an architecture
C The relationship between an application and a database
D A relationship between a class and its interface
6. What does this diagram represent?

A Concrete instances of the Client class
B An abstract Client class
C Objects in a class diagram
D Objects in an object diagram representing specific instances
7. What does the OCL (Object Constraint Language) allow you to express in UML?
A Logical interfaces for components.
B Visual styles for UML diagrams.
C Precise constraints on UML models such as invariants, preconditions, or postconditions.
D User interaction scripts.
8. In UML, what is multiple generalization?
A A child class that inherits from a single parent class.
B A child class that inherits from multiple parent classes.
C A class that inherits from an entire package.
D An interface that inherits from a concrete class.
9. You are building an e-learning system. What UML relationship between a course and its chapters if the chapters exist only with the course?
A Aggregation
B Association
C Dependency
D Composition
10. What does the relationship Student <--> Course mean?

A A Student can be enrolled in several Courses, but a Course can have no Students.
B A Student can be enrolled in only one Course.
C A Course must have at least one enrolled Student.
D A Student cannot be enrolled in multiple Courses.