4.5.4 · D1Software Engineering

Foundations — UML — use case, class, sequence, activity, state machine, component diagrams

3,063 words14 min readBack to topic

Before you can read a UML diagram you must know its vocabulary of marks. This page lists every symbol the parent note uses or quietly assumes, from absolute zero, in an order where each one leans on the previous. No shape is used before it is drawn and named.


0. The most basic marks: box, line, arrow

Everything in UML is built from three primitive marks. Meet them first.

Figure — UML — use case, class, sequence, activity, state machine, component diagrams

1. Actor, oval, boundary (the Use-Case alphabet)

Figure — UML — use case, class, sequence, activity, state machine, component diagrams

2. The class box and its relationship ends

The class diagram reuses the box primitive but splits it into three stacked compartments.

Now the relationship ends — this is where reading "the tips" pays off.

Figure — UML — use case, class, sequence, activity, state machine, component diagrams

3. Sequence-diagram marks: lifeline, bar, arrows

The sequence diagram introduces vertical time. Down = later.

Figure — UML — use case, class, sequence, activity, state machine, component diagrams

4. Flow marks: nodes, decisions, forks (Activity + State)

Activity and state-machine diagrams share a family of flow symbols. These build on Flowcharts and Finite State Machines.


5. Component & deployment marks (packaging the system)

The structural diagrams also describe how code is packaged and deployed. These use their own icons, built again from the box primitive.

Figure — UML — use case, class, sequence, activity, state machine, component diagrams

The prerequisite map

Box, Line, Arrow primitives

Actor, Oval, Boundary, Generalization

Class box, line-ends, navigability

Lifeline, Bar, Message arrows

Nodes, Decision, Fork, Transition, Pseudostates

Component, Package, Deployment icons

Object-Oriented Programming

Flowcharts

Finite State Machines

UML diagram family

Everything descends from the three primitives at the top; only the decoration on the ends differs from diagram to diagram. Deeper study threads into Design Patterns, Software Architecture, Requirements Engineering, and SOLID Principles.


Equipment checklist

Cover the right side and test yourself. If any line stumps you, re-read its section above.

What are the three primitive marks of all UML?
Box (a thing), line (a relationship), arrow (a directed relationship).
Where does most UML meaning live?
At the ends/tips of a line, in the decoration stuck there.
A stick figure means…?
An actor — a role outside the system, not a specific person.
<<include>> vs <<extend>>?
include = always/depended-on sub-behaviour; extend = optional extra reaching into the base.
What does the hollow triangle mean between two actors or two use cases?
Generalization — the tail is a specialized version of (inherits from) the general one.
The three compartments of a class box?
Name, attributes (data), operations (methods).
+ - # ~ stand for…?
public, private, protected, package visibility.
Hollow ◇ vs filled ◆ diamond?
Aggregation (parts survive alone) vs composition (parts die with the whole).
What does the hollow triangle ▷ mean in a class diagram?
Inheritance / generalization — "is-a", pointing at the parent.
What arrowhead does a dependency use, and on what line?
An open (unfilled) arrowhead on a dashed line.
What does an open arrowhead at one end of an association show?
Navigability — one-way awareness; tail class can reach the head class, not vice versa.
Lifeline vs activation bar?
Lifeline (dashed) = object exists; bar = object is actively running a method.
Filled vs open arrowhead on a message?
Filled = synchronous (caller waits); open = asynchronous (caller does not wait).
Decision ◇ vs fork ━?
Decision fires exactly one guarded branch (or); fork fires all branches in parallel (and).
Activity-final ◉ vs flow-final ⊗?
Bullseye stops the whole activity; crossed circle stops only that one flow, siblings continue.
Read coin [hasCredit] / unlock?
event = coin, guard = hasCredit must be true, action = unlock.
What do H and H* pseudostates do?
Shallow history returns to the last direct sub-state; deep history returns to the exact deeply nested sub-state.
Lollipop ○— vs socket ⊂— on a component?
Lollipop = provided interface (service offered); socket = required interface (service needed).
What shape is a deployment node, and what is an artifact?
Node = 3-D box (hardware); artifact = a concrete deployable file (.jar/.exe) deployed onto a node.