UML class diagram of an order domain

This class diagram models orders in a shop: a Customer places any number of Orders, and each Order is composed of one or more OrderLines, each referring to a Product. An Order has at most one Payment, an abstract class with two subclasses, CardPayment and InvoicePayment. Status values come from the OrderStatus enumeration.

Free to start in your browser. Nothing to install.

Class diagram
The Class diagram template in FlowShape

What's in it

  • Seven classes with attributes and operations
  • An enumeration, OrderStatus: NEW, PAID, SHIPPED, CANCELLED
  • Composition from Order to OrderLine, 1 to 1..*
  • CardPayment and InvoicePayment inherit from the abstract Payment
  • Associations with multiplicities, such as Customer 1 to Order 0..*

UMLClass

Good for

  • Designing a domain model before writing code
  • Documenting an existing data structure for a team
  • Teaching UML relationships with a familiar example

A UML class diagram shows classes with their attributes and operations, and the relationships between them: association, composition, inheritance and dependency.

Make it yours

Every shape is editable

Rename, move, restyle or delete anything. Connectors stay attached when shapes move.

In your browser

FlowShape runs in Edge, Chrome or any modern browser. Nothing to install.

Export when you need to

Word, PDF, PowerPoint and Visio (.vsdx).

Start from this template