Create UML class diagrams

A class diagram based on the basic class diagram template in draw.io

UML class diagrams are used to illustrate the structure of a computer program. They detail the types of data or attributes stored within each ‘class’, the methods (operations or functions) that each class provides, and the relationships between the classes.

Class diagrams are likely the most common and important type of UML diagram.

While they commonly document an existing application, you may find your team creates cleaner code when you draw a class diagram before any implementation starts.

Do UML class diagrams need to be detailed?

Accurate and detailed class diagrams are important when changing an existing application, or re-implementing it in another programming language. Specification and implementation details are useful when multiple teams work on the same program.

You can create rough class diagrams using just the names of the classes and drawing their relationships. Use this conceptual level of detail to get feedback on ideas.

While UML has a well-defined notation, you can ‘relax the rules’ in rough class diagrams.

On this page