UML MCQ

UML Diagrams MCQs Questions With Answers – Part 8

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 diagram is used to describe the steps of a business process or an algorithm?

A Class diagram

B Activity diagram

C Component diagram

D Deployment diagram

B
The activity diagram is used to model workflows, business processes, or the logic of an algorithm.
 

2. What does it mean when a use case is extended by another?

A The use case is duplicated

B The second use case is never executed

C The behavior is optional and adds to the first

D The first completely depends on the second

C
An “extend” relationship indicates that a use case optionally adds behavior to the main one under certain conditions. Example:
 
 

3. Which of the following elements can initiate a use case?

A A class

B An object

C A component

D An actor

D
In a use case diagram, the actor (user or external system) is the one that triggers a use case.
 
 

4. This UML diagram is used to __________________


A Plan tasks

B Show the structure of an application

C Describe interactions between components in a specific scenario

D Define classes and their methods

C
This is a sequence diagram, showing the flow of a real-time interaction between the user, the application, and the database.
 

5. In a component diagram, components are often connected to what?

A Classes

B Use cases

C Interfaces (provided and required)

D States

C
In a component diagram, software elements are connected via interfaces:

  • Provided interface (small circle)
  • Required interface (half-circle turned inward)

Example:
 


image source: wikimedia.org
 

6. What does a filled black circle represent in an activity or state diagram?

A An error

B A synchronization point

C The start of the process or state

D The end of the process

C
A filled black circle represents the initial point, the start of a flow in an activity or state-transition diagram. Example:
 
 
 

7. What does a black circle surrounded by a white circle represent in an activity diagram?

A An alternative entry point

B A possible but uncertain ending

C The final point of the process

D A system error

C
This symbol represents the final state (or end of flow). It means the process or scenario is complete. Example:
 
 

8. What does a dashed arrow represent in a class diagram?

A Aggregation

B Dependency

C State transition

D Optional inheritance

B
A dependency is a temporary and weak relationship. It’s illustrated by a dashed arrow, often used for interface relationships or calls to external services. Example:
 

A Client class depends on a Service class, meaning the Client uses the Service without being responsible for it (e.g., weak coupling).
 

9. Which of the following diagrams is considered an interaction diagram in UML?

A Class diagram

B Component diagram

C Sequence diagram

D Deployment diagram

C
Interaction diagrams (like the sequence and communication diagrams) focus on how objects interact to realize a specific behavior.
 
 

10. Which UML diagram is most appropriate for visualizing the physical architecture of a system, including hardware nodes and deployed software artifacts?

A Component diagram

B Deployment diagram

C Activity diagram

D Composite structure diagram

B
The deployment diagram is a structural diagram that shows how the system is physically deployed: servers, databases, network connections, etc. Example: Typical web application
 

A web client accesses an application server. The application server is connected to a database server.
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 *