UML MCQ

UML Diagrams MCQs Questions With Answers – Part 11

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 of these elements is not a relationship in UML?

A Association

B Aggregation

C Function

D Dependency

C
A function is an operation, not a relationship. The others are possible relationships between classes or objects.
 

2. What does aggregation in UML mean __________

A One completely belongs to the other

B A weak “part-whole” relationship

C Specialization

D An abstract class

B
Aggregation (white diamond) indicates that an element is part of a whole, but can exist independently.
 

3. What is the correct representation of an object in a UML object diagram?

A Rectangle with name and attributes underlined

B Rectangle with a black background

C Oval with messages

D Empty rectangle

A
Objects are represented like classes, but their name is underlined to indicate an instance. Example: :BankAccount
 
 

4. What does this diagram show?


A The Invoice class inherits from Payable

B Payable is an abstract class

C The Invoice class implements a Payable interface

D Invoice depends on Payable

C
The dashed line with a triangle implements (<|..) designates an interface implementation. Invoice must provide concrete behavior for pay().
 

5. In a class diagram, what is the difference between an interface and an abstract class?

A The interface can have attributes

B An abstract class can have an implementation

C The interface is instantiable

D No difference

B
  • An interface: 100% methods without bodies (to be implemented).
  • An abstract class: can have methods already implemented.
 

6. What notation is used to indicate that a class contains a collection of objects in a class diagram?

A A diamond

B A square with arrows

C A dashed line

D A solid line with multiplicity *

D
The multiplicity * indicates that a class can be associated with any number of objects from another class, meaning a collection relationship. Example:
 
 
 

7. In a use case diagram, what does an arrow pointing from the actor to a use case indicate?

A An inclusion

B An extension

C A return message

D An association

D
An arrow between an actor and a use case represents an association: the actor interacts with the use case, it is a participation relationship.
 

8. In a state transition diagram, what is a “final state”?

A A state where the process has not yet started

B A state where the process makes a decision

C A state where the object or process is finished

D A state where the system is waiting for user action

C
A final state indicates that the process is completed. It is represented by a black circle surrounded by a white circle in the diagram.
 

9. What does this sequence diagram model?


A The structure of a payment system

B The chronological flow of an order with payment

C The state transitions of the payment service

D The relational model of a database

B
The diagram shows the chronological order of interactions between objects (or components) in a purchasing scenario.
 
 

10. What is an “extension” in a use case diagram?

A A relationship between two actors

B A conditional variant of a use case

C A mandatory inclusion in all use cases

D A loop in a process

B
An extension in a use case diagram adds conditional behavior to a use case. It is represented by an arrow with <<extend>> indicating an extension at a specific moment. 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 *