UML MCQ

UML Diagrams MCQs Questions With Answers – Part 23

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. What does <<include>> mean here?


A The command is optional

B The client can order without authenticating

C The “Order” case requires authentication

D “Authenticate” is a possible extension

C
<> means that one use case is always included in another. Here, for “Place Order,” “Authenticate” is required.
 

2. Which UML fragment represents a conditional repetition (equivalent to a while loop)?

A alt

B opt

C par

D loop

D
The loop fragment is used to indicate that the messages inside are repeated as long as a condition is true. You can specify the min/max bound or a loop condition. Example:
 
 

3. What is the standard UML symbol for implementing an interface in a class diagram?

A A solid arrow with a closed tip

B A dashed arrow with an open tip

C A solid line with no arrow

D An association with multiplicity 1..*

B
When a class implements an interface, UML connects it with a dashed line and an open arrow pointing to the interface. If a class inherits from another, it’s a solid line with a closed arrow. Example:
 
 
 

4. What does the <<include>> relationship mean in a use case diagram?

A An optional feature

B A secondary use case extended from a primary one

C A use case called systematically by another

D A dependency between two classes

C
The <<include>> relationship allows extracting a common part from several use cases. It is always executed when the main case is triggered. It’s functional factoring.
 

5. You are creating a cooking app. What relationship models the link between a recipe and its steps (which only exist within the recipe)?

A Aggregation

B Dependency

C Composition

D Association

C
The steps are an integral part of the recipe → they cannot exist on their own → composition. Example:
 
 

6. Which UML diagram is best suited to describe the modular organization (packages, dependencies) of a software system?

A Sequence diagram

B Activity diagram

C Class diagram

D Package diagram

D
The package diagram shows the logical organization of the model in groups. It helps structure a large system and represent dependencies between packages (imports, usage…). Example:
 
 
 

7. You want to illustrate the scenario: “A student registers for a course, then receives a confirmation.” Which diagram would you use?

A Communication diagram

B Deployment diagram

C Sequence diagram

D Activity diagram

C
It shows the exchange of messages in temporal order → perfect for a registration. Example:
 
 

8. In UML, how is a generic class (template/generics) represented?

A With stereotypes

B With an abstract class

C With parameters placed between << >>

D With a box containing the parameter name between angle brackets < >

D
Generic classes in UML are indicated by a type parameter in a box at the top right of the class, for example: List<T> where T is a type parameter. Example:
 
 

9. Among the following diagrams, which one is not part of UML’s behavioral diagrams?

A Activity diagram

B State diagram

C Class diagram

D Use case diagram

C
The class diagram is a structural diagram, not a behavioral one. Behavioral diagrams describe how the system behaves or interacts, such as: use cases, activities, states, sequences…
 
 

10. What does <<extend>> mean here?


A The “Share” case is always executed

B “Share” is an option that can be activated on demand

C “Share” is the main case

D “Share” replaces “Consult”

B
<<extend>> allows adding optional behavior. Here, after consulting an article, the user can (or not) share it.
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 *