UML Cheatsheet

Class Diagram Elements
Package::AbstractClass -Attribute : Type -ClassAttribute : Type +Operation(Arg:Type):Type #AbstractOperation generalization visibility Note dependency Parent multiplicity 1 parent role association

child

*

Child

Association Class

*
0..1 info

SubClass

<<interface>> Interface

ChildInfo

realizes qualified association Value 1 key Interface dependency ParameterizedClass Operation(Arg: T) Operation2(): T T

Implementor

Sequence Diagram Elements
Object : Class Object2 object creation call(obj) incoming message new Object3

callback interaction frame loop / alt / opt return delete frame type {constraint} {alternative} callUnderConstraint callUnderAlternative object destruction

selfCall

(cc) 2006 Lou Franco - Some Rights Reserved - Attribution-NonCommercial-ShareAlike 2.5 http://creativecommons.org/licenses/by-nc-sa/2.5/

Attribution-NonCommercial-ShareAlike 2.5/ .Package Diagram Elements dependency Data View Model SQLServer Oracle Object Diagram Elements parent: Parent John : Child name = "John" Mary : Child name = "Mary" Use Case Diagram Elements system boundary actor <<include>> Role Use Case Common Use Case Role <<include>> Use Case Use Case Role Role (cc) 2006 Lou Franco .Some Rights Reserved .org/licenses/by-nc-sa/2.5 http://creativecommons.

member.5/ .Attribution-NonCommercial-ShareAlike 2.org/licenses/by-nc-sa/2.Some Rights Reserved .Sample Class Diagrams Component +bg : Color +fg : Color +pos: Point +size: Dimension +Paint(dc) DrawingContext drawRect drawLine drawEllipse * children 1 parent Button EditBox Panel Container Invoice * LineItem quantity : int +calcTotal() : Money 1 Product price : Money TV Radio che 1 Library checkout return 1 Membership start : Date renewal : Date Lendable * 1 LendRecord id newArrival : Boolean calcDueDate(member): Date * due : Date returned : Boolean LendRecord(lendable.5 http://creativecommons. date) isDue() : Boolean renew(Date) * Book CD 1 * Member DVD (cc) 2006 Lou Franco .

Some Rights Reserved . member) aMember aLendable canBorrow(lendable) numOut(member) opt { canBorrow == true } calcDueDate(member) dueDate record new aLendRecord (cc) 2006 Lou Franco .org/licenses/by-nc-sa/2.5/ .Attribution-NonCommercial-ShareAlike 2.5 http://creativecommons.Sample Sequence Diagrams aPanel child : Component dc : DrawingContext paint(dc) loop { forEach child } paint(dc) drawOperation(args) : Library checkout(lendable.