Unified Modelling Language (UML)
UML
Unified Modelling Language (UML) is a standardised visual language used to model the design of software systems.
UML provides a way to represent the structure and behaviour of a system, making it easier to understand, communicate, and develop complex software.
NoteUML is not limited to object-oriented programming but is particularly well-suited for it due to its ability to represent classes, objects, and their interactions.
UML Class Diagrams
UML class diagrams are a core component of UML, used to depict the static structure of a system.
They show:
- Classes
- Attributes
- Methods
- Relationships
- UML class diagrams should not be confused with flowcharts.
- While flowcharts represent the flow of control in a program, UML class diagrams depict the static structure of a system.
A UML class diagram is typically represented as a rectangle divided into three compartments:
- Top Compartment: Contains the class name.
- Middle Compartment: Lists the attributes (data) of the class.
- Bottom Compartment: Lists the methods (actions) the class can perform.

When designing UML class diagrams, always include both attributes and methods to provide a complete picture of the class's functionality.
Additionally, UML can depict access modifiers of attributes and methods:
- Private: -
- Protected: #
- Public: +
