(using relationship - "uses")
A - B or A -> B (A is associated with B)
- weakest relationship (semantic dependency)
- no ownership, separate life-times
- allows one object instance to cause another to perform an action on its behalf
- the causation is called "sending a message", "invoking a method" or "calling a member function" to the controlled object
- navigation across an association is bidirectional
- it may be limited to one direction by adorning some end with an arrowhead pointing to the direction of traversal
- e.g.
Manager & Access card
(special association - using relationship with "has")
A -<> B (A groups B)
- objects have their own-life cycle, but an ownership exists
- inbetween Association and Composition
- e.g.
Manager & Worker
(existence relationship "has a")
A -<:> B (A has B)
- object composition (not to be confused with function composition) is a combines simple objects into more complex ones
- life-time of both objects is bound together (owner dies with ownee and vice-versa)
- e.g.
Project & Manager
(needs to know)
A ---> B (A needs to know about B)
- something depends on a reference to something
- e.g.
Order & Customer
(inheritance - "is a")
A -|> B (A specializes B, B is a generalization of A)
- one object extends another one and inherits its interface and variables