Appendix

UML Notation at a Glance

Every kind of diagram the subject uses, drawn once in full with every symbol labelled. Use this page as a quick reference while you read the Parts, and as a model of what a complete, correct diagram looks like in the exam.

A.1

Class Diagrams: Lines and Arrowheads

A class diagram is boxes joined by lines, and almost all of the meaning is in the line style and the arrowhead. There are seven combinations to know. Learn them as pairs: solid or dashed line, and which of four ends it has (none, open arrow, hollow triangle, diamond).

Customer Order 1* places ▸ Association A lasting relationship worth remembering. Name it with a verb phrase, add a reading arrow (▸) and a multiplicity at each end: one Customer places many (*) Orders. Register Sale currentSale1 Navigable association (design class diagrams) Register can reach Sale: in Java, Register has a field currentSale : Sale. The open arrow shows which way visibility goes; the role name becomes the field name. CashPayment Payment Generalisation CashPayment is a kind of Payment. Solid line, hollow triangle pointing at the superclass. In Java: class CashPayment extends Payment. TaxMaster «interface»ITaxCalc Interface realisation TaxMaster implements the ITaxCalc interface. Dashed line, hollow triangle. In Java: class TaxMaster implements ITaxCalc. Register Catalog Dependency Register uses a Catalog (as a parameter, a local variable or a static call) but keeps no field for it. Dashed line, open arrowhead. A change to Catalog may break Register. Team Player * Aggregation (avoid) Hollow diamond on the whole: a vague "has-a". UML gives it no meaning beyond a plain association, so Larman says leave it out and draw an ordinary association instead. Order LineItem 1..* Composition Filled diamond on the whole: each part belongs to exactly one whole at a time, and it is created and destroyed with it. Delete the Order and its LineItems go too.
The seven relationships. The diamond always sits at the whole end; the triangle always points at the more general thing; an open arrow points the way a reference or call goes.

A complete domain model

This is the subject's own notation-reference example (a university club), redrawn. A domain model shows real-world concepts, their attributes and the associations between them. It has no methods and no arrowheads on associations, because it describes the world, not software.

Event locationdatetime Member nameemaildate_of_birth Subject subject_idnamedepartment ◂ Attends ** enrolled ▸ *1..4 Committee Member Regular Member membership_expiration_date *1 ◂ Creates Position responsibilitiesvoting_rights 1* Has ▾ Appointment date_of_commencement association class President General Committee Treasurer Club Account funds_available : Dollar 11 Uses ▸ One member only for each
Everything a domain model can contain. Association names with reading arrows (◂ Attends: a Member attends Events), multiplicities at both ends (1..4 subjects), generalisation trees drawn with one shared triangle, an association class (Appointment, joined by a dashed line, because the date belongs to the pairing of member and position) and a note. Attributes are plain names, optionally with a simple type such as Dollar.

A complete design class diagram

A design class diagram (DCD) describes software classes. Compared with the domain model it adds a third compartment for methods, visibility markers (+ public, - private), types, and navigability arrows with role names that become fields in code.

Register +endSale()+enterItem(id: ItemID, qty: Integer) +makeNewSale()+makePayment(cashTendered: Money) Sale -isComplete: Boolean-time: DateTime +getTotal(): Money+makeLineItem(desc, qty) currentSale1 ProductCatalog +getProductDesc(id: ItemID): ProductDescription catalog1 SalesLineItem -quantity: Integer+getSubtotal(): Money lineItems {ordered}1..* ProductDescription -description: Text-price: Money-itemID: ItemID description1 descriptions {Map}1..*
Reading a DCD. Three compartments: name, attributes, operations. -quantity: Integer is a private attribute; +getTotal(): Money is a public method returning Money. An arrow from Register to Sale labelled currentSale means Register holds a Sale currentSale field, and {ordered} on lineItems means a List. Attributes that are references to other classes are shown as arrows, not repeated inside the box.
ElementDomain model (conceptual)Design class diagram (software)
Boxes arereal-world conceptssoftware classes and interfaces
Attributesplain names, simple data types onlyvisibility, name and type: -price: Money
Methodsneveryes, with parameters and return types
Associationsplain lines with a name and reading arrownavigable arrows with a role name (the field)
Multiplicityat both endsat least at the arrow end
A.2

Sequence Diagrams

A sequence diagram shows who sends which message to whom, in what order. Each participant gets a box at the top with a dashed lifeline running down; time flows downward; each message is a horizontal arrow from sender to receiver. The subject uses two kinds: the system sequence diagram (SSD), which treats the whole system as one black box, and the design sequence diagram, which opens the box and shows the software objects inside.

System sequence diagram (SSD)

:Cashier :System makeNewSale() loop [more items] enterItem(itemID, quantity) description, total endSale() total with taxes makePayment(amount) change due, receipt
An SSD has exactly two kinds of participant: the external actor (a stick figure) and :System as one black box. Solid arrows with filled heads are system events the actor sends; dashed arrows are returned information. A loop frame repeats its contents while its guard holds.

Design sequence diagram

The design version keeps the same notation and adds activation bars (the thin rectangles showing when an object is busy), self-calls, object creation and more kinds of frame. The numbered badges are explained below the diagram.

:Register :Sale li : SalesLineItem makePayment(cash) makePayment(cash) t := getTotal() loop [for each li in lineItems] st := getSubtotal() alt [cash >= t] [else] create(cash) p : Payment flagShortfall() result 1 2 3 4 5 6 7
Design sequence diagram notation, using the NextGen POS makePayment operation (the shortfall branch is illustrative).
  1. Found message. A message whose sender is not shown starts at a filled dot. In a design diagram, the first message is usually the system operation from the SSD arriving at a controller.
  2. Activation bar. A thin rectangle on a lifeline shows the period when that object is executing a method (including waiting for the methods it calls).
  3. Self-call. An object calling its own method: the arrow loops back, and a second, nested activation bar starts. t := getTotal() means the returned value is stored in t.
  4. Loop frame. loop in the corner tag, with a guard in square brackets saying how often it repeats.
  5. Creation. The create(...) message points at the new object's box, which is drawn at the height where it is created rather than at the top. Its lifeline starts there.
  6. Alt frame. Mutually exclusive alternatives (if / else), separated by a dashed line, each with its own guard. opt is the one-branch version (an if with no else).
  7. Return. A dashed line with an open arrowhead. It is optional in design diagrams; the t := ... form usually says the same thing more compactly.
A.3

Use Case Diagrams

A use case diagram is a context picture: it shows the system boundary, the actors outside it, and the names of the use cases inside it. The real requirements are in the use case text; the diagram is just the table of contents.

Online Clothing Website Customer Search Products View Product Manage Cart Checkout Buy Now Advanced Search Submit Shipping& Payment Details «extend» «include» «include» «actor»Payment Service
Use case diagram notation. Actors stand outside the boundary box; use cases are ovals named with a verb phrase. A plain line means "takes part in". «include» points from the base use case to the shared piece it always uses; «extend» points from the optional extension to the use case it extends. A computer system acting as an actor is often drawn as a box with «actor».
A.4

State Machine Diagrams

A state machine shows the life of one object (or system): the states it can be in, and the events that move it from one state to another. A transition is labelled event [guard] / action, and each part is optional.

turnOn / initialise Standby disconnect startService Active Waiting for card cardInserted / scanCard Waiting for PIN pinEntered [incorrect] pinEntered [correct] Waiting for request entry / showMenu depositSelected withdrawalSelected Waiting for cash Waiting for amount cashInserted amountEntered Waiting for card removal cardRemoved
State machine notation (the subject's ATM notation-reference example). Filled dot: initial state. Bullseye: final state. Rounded boxes: states. Active is a composite state containing its own sub-machine with its own initial state; cardRemoved leaves the whole composite. pinEntered [incorrect] is a self-transition with a guard; / scanCard is an action done during the transition; entry / showMenu is an internal activity done on entering the state.
A.5

Communication Diagrams

A communication diagram shows the same messages as a sequence diagram, but the objects can sit anywhere on the page. Because position no longer shows the order, every message carries a sequence number. Objects are joined by links (plain lines), and every message between two objects travels along their one link, with a small arrow beside it showing its direction.

makePayment(cash) :Register :Sale p : Payment {new} lineItems[i] : SalesLineItem 1: makePayment(cash) 1.1: t = getTotal() 1.1.1 *: st = getSubtotal() 1.2: create(cash)
The same makePayment interaction as in A.2, drawn as a communication diagram. The first message is not numbered. A message sent while handling message 1 is numbered 1.1, the next one at that level 1.2, and a message sent while handling 1.1 is 1.1.1. The * marks iteration, and {new} marks an object created during the interaction. Object names are underlined because they are instances.
Sequence diagramCommunication diagram
StrengthOrder is obvious: read top to bottom. Richest notation (frames).Compact: objects can go anywhere, easy to sketch and change.
WeaknessNew objects go on the right, so it grows wide.You must read the numbers to see the order.
A.6

Package Diagrams

A package diagram groups classes into packages (folders drawn with a tab) and shows which packages depend on which. It is the usual way to draw a layered architecture. Packages can be nested. When a package's contents are drawn inside it, its name goes in the tab.

UI Swing Web Domain Sales Payments Pricing Technical Services Persistence Logging
Layers as packages. Dashed arrows are dependencies: the UI layer depends on the Domain layer, and the Domain on Technical Services, never the other way. Inside Domain, Sales depends on Pricing. Part VIII explains why the arrows must point downwards.
A.7

Glossary

Every key term in the subject, in one place. The last column says which Part teaches it.

TermMeaningPart
Abstract FactoryA factory interface for creating families of related objects; each concrete factory produces one consistent family.VI
Activation barThe thin rectangle on a lifeline in a sequence diagram, showing when that object is executing a method.III
ActorSomething with behaviour outside the system that interacts with it: a person, an organisation or another computer system. Primary, supporting or offstage.I
AdapterConverts the interface of an existing class into the interface a client expects, so incompatible classes can work together.VI
AggregationA hollow-diamond whole–part association. UML gives it no precise meaning, so Larman recommends avoiding it.II
Alt frameA sequence-diagram frame holding mutually exclusive alternatives (if / else), each with a guard.III
Architectural factorA requirement with significant influence on the architecture, usually a quality such as reliability or performance; recorded in the factor table.VIII
AssociationA relationship between classes that indicates a meaningful, lasting connection; named with a verb phrase and given multiplicities.II
Association classA class attached to an association by a dashed line, holding attributes that belong to the link itself (e.g. Appointment between Member and Position).II
AttributeA logical data value of an object. In a domain model, attributes should be simple data types; anything complex is a class joined by an association.II
BuilderSeparates the step-by-step construction of a complex object from its representation, so the same steps can build different results.VI
CohesionHow strongly related and focused one element's responsibilities are. High Cohesion keeps it so.IV
Communication diagramAn interaction diagram that shows objects as a graph joined by links, with numbered messages instead of a time axis.III
CompositeTreats individual objects and groups of objects uniformly, by giving the group the same interface as its parts; used for tree structures.VII
Composite stateA state that contains its own nested state machine.V
CompositionA filled-diamond whole–part association: each part belongs to one whole at a time and is created and destroyed with it.II
Conceptual classA real-world idea or thing in the problem domain, shown in a domain model; it has a symbol, an intension (definition) and an extension (instances).II
ControllerGRASP: the first object beyond the UI layer that receives and coordinates a system operation; either a facade controller or a use-case controller.IV
CouplingHow strongly one element is connected to, knows about or relies on others. Low Coupling keeps it low.IV
CreatorGRASP: give class B the responsibility to create A if B contains, records, closely uses or has the initialising data for A.IV
DecoratorAttaches extra responsibilities to an object dynamically by wrapping it in objects with the same interface.VI
DependencyA dashed arrow showing that one element uses another (a parameter, local variable or static call) without holding a field for it.II
Design class diagram (DCD)A class diagram of software classes, with attributes, methods, types, visibility and navigable associations.III
Design sequence diagramA sequence diagram of software objects sending messages to carry out a system operation.III
Domain layerThe layer of software objects representing domain concepts and fulfilling the application's logic; its classes are inspired by the domain model.VIII
Domain modelA visual representation of conceptual classes, their attributes and associations in the problem domain. No methods, no software classes.II
ElaborationThe second UP phase: the core architecture is built and tested and most requirements are discovered and stabilised.I
Event (state machine)A significant occurrence that can trigger a transition, such as cardInserted.V
FacadeA single simplified interface to a subsystem, hiding its internal classes from clients.VI
FactoryAn object (a Pure Fabrication) whose job is to create other objects, hiding complex creation logic.VI
Factory MethodDefines a method for creating an object but lets subclasses decide which class to instantiate.VI
Fully dressed use caseThe most detailed use case format: scope, level, stakeholders and interests, preconditions, success guarantee, main success scenario, extensions and more.I
FURPS+The requirement categories: Functionality, Usability, Reliability, Performance, Supportability, plus implementation, interface, operations, packaging and legal constraints.I
GeneralisationAn is-a relationship between a general class and a more specific one, drawn with a hollow triangle; must satisfy the 100% and is-a rules.II
GoF patternsThe 23 design patterns catalogued by the “Gang of Four” (Gamma, Helm, Johnson, Vlissides), in creational, structural and behavioural groups.VI
GRASPGeneral Responsibility Assignment Software Patterns: nine principles for assigning responsibilities to objects.IV
GuardA boolean condition in square brackets that must be true for a transition (or a sequence-diagram fragment) to happen.V
InceptionThe first UP phase: a short look at vision, scope and feasibility. Not a requirements phase.I
IndirectionGRASP: assign a responsibility to an intermediate object to mediate between others, so they are not directly coupled.IV
Information ExpertGRASP: give a responsibility to the class that has the information needed to fulfil it.IV
Iterative developmentBuilding the system in a series of short, fixed-length iterations, each producing tested, integrated, executable software.I
LayerA coarse grouping of classes, packages or subsystems with a cohesive responsibility, such as UI, Domain or Technical Services.VIII
LifelineThe dashed vertical line below a participant in a sequence diagram, representing it over time.III
Logical architectureThe large-scale organisation of the software classes into packages, subsystems and layers.VIII
Model-View SeparationDomain objects must not know about or directly call UI objects; the UI depends on the domain, not the reverse.VIII
MultiplicityHow many instances of one class can be associated with one instance of another, e.g. 1, *, 0..1, 1..*.II
NavigabilityAn arrow on an association in a DCD showing which object can send messages to (has visibility of) the other.III
ObserverLets subscriber objects register with a publisher and be notified when an event happens, without the publisher knowing their concrete classes.VII
Operation contractA description of a system operation's preconditions and postconditions: instances created or deleted, attributes changed, associations formed or broken.II
Package diagramA UML diagram grouping elements into packages and showing the dependencies between them.VIII
PolymorphismGRASP: when behaviour varies by type, assign it to the types themselves using polymorphic operations, instead of testing the type.IV
Protected VariationsGRASP: identify points of predicted variation or instability and wrap a stable interface around them.IV
Pure FabricationGRASP: invent a class that does not represent a domain concept, to achieve high cohesion and low coupling (e.g. a persistence store).IV
Quality scenarioA short, measurable statement of a quality requirement, in the form stimulus and measurable response.VIII
Representational gapThe gap between how we think about the domain and the software that represents it. Naming software classes after domain concepts keeps it low.II
ResponsibilityA contract or obligation of a class: either doing (creating, calculating, coordinating) or knowing (its data, related objects, derived values).IV
SingletonEnsures a class has exactly one instance and provides a global point of access to it, usually a static getInstance().VI
StateA condition of an object at a moment in time, between events.V
State machine diagramA diagram of the states of an object and the transitions between them triggered by events.V
StrategyDefines a family of interchangeable algorithms, each in its own class behind a common interface, chosen at run time.VII
Supplementary SpecificationThe UP artefact recording requirements not captured in use cases, mainly non-functional ones (the URPS+ of FURPS+).I
System operationAn operation the system offers as a black box, triggered by a system event from an actor; shown in an SSD.II
System sequence diagram (SSD)A sequence diagram showing, for one use case scenario, the events actors send to the system as a black box, and the system's replies.II
Technical memoA record of one architectural decision: the issue, a solution summary, the factors, the solution, motivation, unresolved issues and alternatives considered.VIII
Template MethodDefines the skeleton of an algorithm in a superclass method, letting subclasses override particular steps.VII
TransitionA relationship between two states, triggered by an event: when the event occurs (and the guard holds), the object moves to the target state.V
Unified Process (UP)Larman's iterative software process, with phases Inception, Elaboration, Construction and Transition, and disciplines such as Requirements and Design.I
Use caseA collection of related success and failure scenarios that describe an actor using the system to achieve a goal.I
Use case diagramA context diagram of the system boundary, the actors and the names of the use cases; the text holds the actual requirements.I
VisibilityThe ability of one object to see or refer to another: attribute, parameter, local or global visibility.III