A dashed line with a hollow triangle points from ArrayList to List. What does it mean?
Realization: ArrayList implements the List interface.
A solid line with a hollow triangle would mean inheritance (a plain solid line is just an association). A dashed line with an open arrow would mean dependency.
A diagram puts a filled diamond on the Room end of a House–Room line. What is wrong?
The diamond belongs on the whole, so it should be on House.
Filled diamond on House means composition: delete the House and its Rooms go too.
Customer 1 --- 0..* Order. Can an Order exist with no Customer? Can a Customer have no Orders?
No: each Order relates to exactly one Customer.
Attributes are normally private
Operations are normally public
3. Special Marks
Static member: underlined
Abstract operation: in italics
Interface: <<interface>> stereotype above the name
Read a member
- balance : double = 0.0 means private, named balance, type double, default 0.0.
Open arrowhead = navigable: the source class can reach the target
A → B: A knows B, B does not know A
Aggregation also holds a reference, plus a whole-part grouping where the part lives on
2. Diamond Side
Team ◇whole: diamond here
Playerpart: plain end
The diamond always sits on the container (whole) end
3. Lifecycle Test
yesnoyesno, just a reference
Lifecycle
Part outlives whole: aggregation. Part dies with whole: composition. Just a reference: association.
Inheritance (generalization): Dog -> Animal, triangle at the parent
Realization: ArrayList ..|> List, triangle at the interface
Dependency: arrow from the user to the used class
Dependency is weak and temporary: a parameter type or local variable