Unified Modelling Language

Introduction to Software Engineering (CSSE 1001)

Author

Paul Vrbik

Published

May 21, 2026

Unified Modelling Language (UML)

A unified modelling language diagram is the standard way of illustrating relationships among classes.

For instance, for our Animal class we have…

Figure 1: Animal Class Inheritance Hierarchy

UML Class Diagram

A class diagram is a type of UML that shows:

  • Classes and their attributes/methods
  • Relationships (e.g., inheritance, composition, association)

Class diagrams are great for object-oriented design.

Each class is represented by a box which has three parts:

Section Content Example
Top Class Name Animal
Middle Attributes name: str
Bottom Methods speak(): str

Visibility markers:

  • + public # protected  private

Figure 2: Class Box Examples

Inheritance

Each subclass inherits from Animal and adds a speak() method.

Figure 3: UML Inheritance Diagram

UML Association

Describes a “uses/knows about” relationship

Figure 4: UML Association

UML Multiplicity

Multiplicity shows how many objects are involved in a relationship.

Symbol Meaning
0..1 Zero or one
n Exactly n
0..* Zero to many
1..* One to many
m..n Range m to n
Figure 5: UML Multiplicity

UML Composition

Composition is the “has a” relationship. Here, the “part” cannot exist independently of the “whole”.

Figure 6: UML Composition

A Heart cannot outlive its Animal.

UML Aggregation

Aggregation is a weaker form of composition, where the “part” can exist independently of the “whole”.

Figure 7: UML Aggregation

Owner can have multiple Animals, and can exist independently of those animals.

Exercise

Try modelling a UML diagram for a DroneFlight class and its child DeliveryDrone class.

Summary

UML is a visual language used to design and describe software systems.

In object-oriented programming, class diagrams are one of the most used UML tools.

They help represent the structure of a system by showing classes, their attributes and methods, and the relationships between them such as inheritance, association, aggregation, and composition.
Using UML before writing code makes it easier to plan, communicate, and maintain software designs effectively.