UML MCQ

UML Diagrams MCQs Questions With Answers – Part 6

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 class diagram, what does a solid triangular-headed arrow pointing towards an interface represent?

A Association

B Dependency

C Realization (implementation)

D Generalization (inheritance)

C
The realization relationship indicates that a class implements an interface and must therefore provide an implementation for all the operations defined in this interface. Example:
 

A Flying interface defines a method fly(). A Plane class implements this interface, so it must provide the implementation of fly().
 

2. In a sequence diagram, what does a solid line arrow with an open head represent?

A A creation message

B A synchronous message

C An asynchronous message

D A response

B
A synchronous message (regular method call) is represented by a solid arrow with an open head. This means the sender waits for a response before continuing. Example:
 

The diagram shows a classic scenario: A client sends a request, the server processes it, then returns a response. Since the call is synchronous, the client waits for the processing to finish before proceeding.
 

3. Which UML diagram is most useful for understanding the end-user perspective?

A Class diagram

B Activity diagram

C Use case diagram

D Component diagram

C
The use case diagram is focused on what the user wants to do with the system. It’s ideal for discussing with clients and analyzing functional needs.
 
 

4. What does a solid arrow with a white triangular head mean in a class diagram?

A An association

B An aggregation

C A composition

D A generalization (inheritance)

D
Generalization, which represents an inheritance relationship, is drawn with a solid arrow and a white triangle pointing to the superclass. Example:
 
 

5. What does the # symbol before a method mean?

A Public method

B Private method

C Protected method

D Abstract method

C
# : protected (accessible only within the class and its subclasses)
 

6. In an activity diagram, what does a diamond represent?

A A condition or test (decision)

B An end of process

C A start of process

D A system error

A
In an activity diagram, a diamond represents a decision (like an if), with multiple outgoing arrows that are conditioned. Example of an online order process:
 
 
 

7. In UML, what do we call an event that triggers a transition in a state diagram?

A A stimulus

B An action

C A signal

D A trigger

D
A trigger is an event that causes a state change of an object in a state diagram. Example:
 

An event (like paying or canceling) in a UML state diagram is what triggers a transition from one state to another.

 

8. What does an activity diagram represent?

A Inheritance between classes

B Business process or workflow

C The database

D Relationships between actors

B
It describes the flow of a process in terms of activities and decisions (like conditional instructions).
 

9. What does the following UML diagram represent?


A It shows the states of a bank account

B It describes the interactions between the client and the account

C It defines the structure of a class called BankAccount

D It represents a transaction process

C
This is a class diagram describing the attributes and methods of a class called BankAccount.

 
 

10. Which UML diagram focuses on the organization of objects and their links at a specific moment in time?

A Class diagram

B Sequence diagram

C State-transition diagram

D Object diagram

D
An object diagram is a specific instance of a class diagram. It shows a set of objects and their relationships at a precise moment, providing a snapshot of the system’s structure during execution.
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 *