UML MCQ

UML Diagrams MCQs Questions With Answers – Part 29

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 UML, what does an arrow on an association between two classes indicate?

A A directional dependency

B An inheritance relationship

C An implemented interface

D Navigability: the source class can access the target class

D
An arrow on an association indicates that the source class can access the target class (but not necessarily the other way around). It means the relationship is navigable in one direction only. Example:
 

2. How is an abstract class represented in a UML class diagram?

A In italics

B With a # in front of its name

C With <<abstract>>

D With a gray background

A
In UML, the name of an abstract class (and its abstract methods) is written in italics. Optionally, the stereotype <<abstract>> can be added, but it’s not mandatory.
 

3. In a UML deployment diagram, a node represents:

A A logical component

B A main class

C A data packet

D A physical resource (hardware or software)

D
A node is a physical entity (server, database, terminal…) that hosts artifacts or executes components. It is represented by a 3D cube in the diagram. Example:
 
 
 

4. Can a use case include several other use cases in UML?

A No, only one <<include>> is allowed

B Yes, but only if they are conditional

C Yes, it can include as many cases as needed

D Yes, but only if they are actors

C
A use case can contain multiple <<include>> relationships, each pointing to a shared scenario. This is a method to factor reusable parts in different use cases. Example:
 
 

5. What is the role of a port in a composite structure diagram?

A Specifies an OCL constraint

B Determines the multiplicity of an attribute

C Defines a state transition

D Represents a point of interaction between a component and its environment

D
A port is an input/output point for a component. It exposes an interface and can be connected to other components via connectors. Frequently used in systems engineering. Example:
 

 

 

6. What does this arrow represent?


A A synchronous call

B A dependency between two modules in a component diagram

C An inclusion

D A logical composition

B
The component diagram shows how software modules depend on each other. Here, Frontend depends on the API provided by Backend.
 
 

7. What modeling error can result from incorrect multiplicity?

A Memory overload in the diagram

B Objects created without mandatory links when the link is essential

C Circular inheritance

D Loss of type information

B
Incorrect multiplicity (e.g. 0..* instead of 1..*) can allow orphan objects, causing logical bugs (e.g. an order without an item).
 

8. What is the difference between a final node and a final state in UML?

A None, they are two terms for the same thing

B The final node applies to activities, the final state to states

C The final node is temporary, the final state is permanent

D The final state ends all flows simultaneously

B
  • The final node (●◎) ends an activity process.
  • The final state ends the lifecycle of an object in a state diagram. They look similar but belong to different UML diagrams.
 

9. Which diagram allows you to model navigation between several screens of a mobile app?

A Deployment diagram

B Activity diagram

C Use case diagram

D Communication diagram

B
The UML activity diagram is perfectly suited for modeling screen navigation, as it visually represents the flow of actions or decisions a user can take in an application. Each activity may correspond to a screen or interaction (e.g. filling a form, clicking a button), and arrows show possible transitions based on user choices or conditions. This provides a fluid visual of the user journey, clearly identifying each step and UI alternative.
 
 

10. What does {ordered} mean?


A The items are all identical

B The items are arranged in a specific order

C The items are all read-only

D The order is random

B
The {ordered} constraint indicates that the order of objects in the collection matters (e.g. like in a list).
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 *