How do I analyse and document an existing business
process using the Unified Modeling Language (UML)? - Part 4
Object Diagrams
These illustrate the combinations of specific instances of a
class diagram. They can be used to explain a complicated class diagram by
looking at the relationships at a specific moment in time. Object diagrams are
drawn with objects and links. Links are instances of associations and
aggregations. Because an object diagram is a snapshot, multiplicity is not
shown.
In terms of notation, object names are underlined and
composed of:
Typical examples are:
These would
be drawn as:
Named objects (e.g. Andrea : Person, Bob) are
used when the name of the object is of primary interest. The anonymous name
form (: Person) is used when only the class is of interest and no
specific name is needed for the object.
In addition to object names, the state and attribute values
of an object can be shown. The state is shown in brackets after the object
name:
Practical Exercise:
Create an Object Diagram
Using the text below, draw an object diagram using UML.
"Fred and Sally
both work for Bob. Fred has two employees who work for him. One of them is
named Betty. Bob is a manager and both Fred and Sally are supervisors. Sally
is currently on vacation." |
|
|