UML MCQ

UML Diagrams MCQs Questions With Answers – Part 17

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. Which UML relationship expresses the strongest dependency link between two classes?

A Association

B Dependency

C Aggregation

D Composition

D
Composition is the strongest link between two classes. If the “parent” object is destroyed, the “child” objects are also destroyed. For example, a heart cannot exist without a body.
 

2. In a video game with characters, how would you model the relationship between a main character and its allies?

A Association

B Composition

C Aggregation

D Dependency

A
The allies are linked to the main character, but their existence can be independent.
 

3. To model the state changes of an online shopping cart, which diagram would be the most appropriate?

A Sequence Diagram

B State Diagram

C Use Case Diagram

D Class Diagram

B
A state diagram shows the successive states of the cart: empty, filled, validated, paid. Example:
 
 
 

4. What is the difference with a synchronous message?

A The asynchronous message does not wait for a response

B The asynchronous message creates a new instance

C The asynchronous message is not sent to the user

D There is no difference, it’s the same message

A
Asynchronous messages are sent without waiting for an immediate response, allowing the sender to continue its process without blocking execution. Example:
 
 

5. In a user management system, which diagram would model the sequence of actions during the creation of a user account?

A Communication Diagram

B Sequence Diagram

C Class Diagram

D Deployment Diagram

B
A sequence diagram shows the order of actions and messages during the creation of a user account. Example:
 
 

6. In a taxi reservation system, what type of UML relationship would you use to link a taxi to its drivers?

A Aggregation

B Dependency

C Association

D Composition

A
A taxi can have multiple drivers, but the taxi exists independently of the drivers. Example:
 
 

7. What is the fundamental difference between an abstract class and an interface in this diagram?


A Interfaces cannot have abstract methods

B A class can implement multiple interfaces but inherit from only one abstract class

C Interfaces are used to contain attributes

D Abstract classes cannot have methods

B
In UML, a class can implement multiple interfaces (such as Drawable), but it can inherit from only one abstract class (like Shape).
 

8. I am a rectangle, sometimes with an empty triangle, I connect a concrete class to an interface. Who am I?

A Realization

B Association

C Dependency

D Inheritance

A
Realization connects a class to an interface with a dashed arrow and an empty triangle. Example:
 

9. You want to show where your website will be deployed: servers, browser, database, etc. Which diagram should you choose?

A Use Case Diagram

B Deployment Diagram

C Class Diagram

D Component Diagram

B
The deployment diagram represents the physical architecture: servers, terminals, network connections. Example:
 
 
 

10. You want to represent the evolution of a support ticket: “open” → “in progress” → “resolved” or “closed”. Which diagram would you use?

A Class Diagram

B Activity Diagram

C State Diagram

D Sequence Diagram

C
This is about modeling the possible states of a ticket over time → state diagram. Example:
mcqMCQPractice competitive and technical Multiple Choice Questions and Answers (MCQs) with simple and logical explanations to prepare for tests and interviews.Read More

Leave a Reply

Your email address will not be published. Required fields are marked *