UML Cheat Sheet
UML Cheat Sheet
1. Structural Diagrams
Describe the static parts of the system — what it is.
2. Behavioral Diagrams
Describe the dynamic parts — what it does.
Key Diagrams
Class Diagram(Exercised)
A Class Diagram is fundamental for modeling the static structure of
your system. It shows how different classes are structured, what their
attributes and methods are, and how they are related to each other (via
inheritance, association, or composition).
Relationships:
🔹 Example:
In your vending machine:
● Use Case: "Buy Item"
🔹 Example:
● Use Case: "Buy Item"
✅ 3. Multiplicities
Use to show: How many instances of an actor or use case can be
involved.
🔹 Example:
● A user can buy many items → 1..*
Customer (1..*)
Technician (0..1)
● Actors:
● Use Cases:
Relationships:
📨 Messages:
Actors/components send messages (actions) to each other. These are
shown as horizontal arrows going from one participant to another.
1. Synchronous message:
● Example:
"User requests to pay" → system processes payment → then
replies "Payment successful".
Explanation:
● CartService queries the database for the cart items and sends
them back to the WebApp.
Activity Diagram(Exercised)
An Activity Diagram shows the flow of control through a system,
including the conditions, loops, and concurrency (parallel actions). It’s
often used for modeling business processes or workflows.
● If the payment fails, the system notifies the admin and ends.
Deployment Diagram
A Deployment Diagram shows how software components are deployed
to physical hardware and infrastructure. It is crucial for understanding
how your system will run in a distributed or cloud environment.
● Microservices: