UML Class Diagram Basics Quiz

  • 11th Grade
Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Thames
T
Thames
Community Contributor
Quizzes Created: 6575 | Total Attempts: 67,424
| Attempts: 13 | Questions: 15 | Updated: May 2, 2026
Please wait...
Question 1 / 16
🏆 Rank #--
0 %
0/100
Score 0/100

1. In a UML class diagram, what symbol represents a public attribute or method?

Explanation

In UML class diagrams, a public attribute or method is denoted by a plus sign (+). This symbol indicates that the attribute or method can be accessed from outside the class, making it a fundamental aspect of object-oriented design to ensure proper encapsulation and visibility of class members.

Submit
Please wait...
About This Quiz
UML Class Diagram Basics Quiz - Quiz

This UML Class Diagram Basics Quiz tests your understanding of class diagrams, a core tool in object-oriented design. Learn to identify attributes, methods, relationships, and visibility modifiers that define how classes interact. Essential for software design and programming courses.

2.

What first name or nickname would you like us to use?

You may optionally provide this to label your report, leaderboard, or certificate.

2. Which visibility modifier is indicated by a minus sign (-) in UML?

Explanation

In UML (Unified Modeling Language), a minus sign (-) denotes the private visibility modifier. This means that the attribute or method is accessible only within the class it is defined in, restricting access from outside classes. This encapsulation principle helps in maintaining data integrity and controlling access to class members.

Submit

3. A class named 'Vehicle' has a method drive(). How should this appear in UML notation?

Explanation

In UML notation, a method's visibility is indicated by symbols preceding its name. The "+" symbol denotes public access, meaning the method can be called from outside the class. Therefore, "+drive()" signifies that the drive() method of the Vehicle class is publicly accessible, allowing other classes or objects to invoke it.

Submit

4. What does a solid arrow pointing from Child to Parent represent in a UML class diagram?

Explanation

In a UML class diagram, a solid arrow pointing from the Child class to the Parent class signifies inheritance, indicating that the Child class derives attributes and behaviors from the Parent class. This relationship establishes a "is-a" connection, where the Child class is a specialized version of the Parent class.

Submit

5. In UML, the relationship where a class contains objects of another class and owns their lifecycle is called ____.

Explanation

Composition in UML represents a strong relationship between classes, where one class (the container) contains objects of another class (the contained) and is responsible for their lifecycle. If the container is destroyed, the contained objects are also destroyed, indicating a whole-part relationship that emphasizes ownership and dependency.

Submit

6. Which relationship in UML is represented by a hollow diamond connected to a class?

Explanation

In UML, a hollow diamond indicates aggregation, which represents a "whole-part" relationship where the part can exist independently of the whole. This signifies that the whole is composed of parts, but those parts can exist on their own, distinguishing it from composition, where the parts are dependent on the whole for their existence.

Submit

7. What does the multiplicity notation '1..*' mean in a UML association?

Explanation

In UML, the multiplicity notation '1..*' indicates that there must be at least one instance of the associated class, but there is no upper limit on how many instances can be associated. This means that while at least one instance is required, multiple instances are allowed, signifying a one-to-many relationship.

Submit

8. A class box in UML is divided into three sections. The middle section contains ____.

Explanation

In UML class diagrams, a class box is structured into three sections: the top for the class name, the middle for attributes, and the bottom for methods or operations. The middle section specifically lists the attributes, which represent the properties or characteristics of the class, defining its state.

Submit

9. A class has a private attribute 'salary'. In UML, this is written as ____.

Explanation

In UML, attributes of a class are represented with a visibility modifier preceding the attribute name. A private attribute is denoted by a minus sign (-) before the attribute name. Therefore, 'salary' being private is correctly represented as '-salary' in UML notation.

Submit

10. What is the purpose of a UML class diagram?

Explanation

A UML class diagram serves to illustrate the static structure of a system by depicting classes, their attributes, methods, and the relationships between them. This visualization helps in understanding how different classes interact and relate to one another, which is crucial for system design and architecture.

Submit

11. In UML, a dashed arrow from one class to another indicates a ____ relationship.

Explanation

In UML, a dashed arrow signifies a dependency relationship, indicating that one class relies on another for its functionality. This means changes in the dependent class can affect the class it relies upon, highlighting a weaker association compared to solid lines, which represent stronger relationships like associations or inheritances.

Submit

12. Which of the following best describes an abstract class in UML?

Explanation

An abstract class in UML is represented in italics to indicate that it serves as a blueprint for other classes and cannot be instantiated directly. This signifies that it may contain abstract methods that must be implemented by its subclasses, emphasizing its role in defining common characteristics and behaviors without creating objects of its own.

Submit

13. True or False: In UML, a solid line with an arrowhead pointing to a parent class represents aggregation.

Submit

14. Which notation correctly represents a method that returns an integer in UML?

Submit

15. Protected members in a UML class diagram are indicated by a ____ sign.

Submit
×
Saved
Thank you for your feedback!
View My Results
Cancel
  • All
    All (15)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
In a UML class diagram, what symbol represents a public attribute or...
Which visibility modifier is indicated by a minus sign (-) in UML?
A class named 'Vehicle' has a method drive(). How should this appear...
What does a solid arrow pointing from Child to Parent represent in a...
In UML, the relationship where a class contains objects of another...
Which relationship in UML is represented by a hollow diamond connected...
What does the multiplicity notation '1..*' mean in a UML association?
A class box in UML is divided into three sections. The middle section...
A class has a private attribute 'salary'. In UML, this is written as...
What is the purpose of a UML class diagram?
In UML, a dashed arrow from one class to another indicates a ____...
Which of the following best describes an abstract class in UML?
True or False: In UML, a solid line with an arrowhead pointing to a...
Which notation correctly represents a method that returns an integer...
Protected members in a UML class diagram are indicated by a ____ sign.
play-Mute sad happy unanswered_answer up-hover down-hover success oval cancel Check box square blue
Alert!