An object diagram is a diagram that shows a set of objects and their relationships at a point in time. Graphically, an object diagram is a collection of vertices and arcs.
An object diagram is a special kind of diagram and shares the same common properties as all other diagramsthat is, a name and graphical contents that are a projection into a model. What distinguishes an object diagram from all other kinds of diagrams is its particular content.
|
The general properties of diagrams are discussed in Chapter 7 . |
|
Objects are discussed in Chapter 13; links are discussed in Chapter 16 . |
Object diagrams commonly contain
Like all other diagrams, object diagrams may contain notes and constraints.
Sometimes you'll want to place classes in your object diagrams as well, especially when you want to visualize the classes behind each instance.
|
Class diagrams are discussed in Chapter 8; interaction diagrams are discussed in Chapter 19 . |
Note
An object diagram correlates with a class diagram: The class diagram describes the general situation, and the instance diagram describes specific instances derived from the class diagram.An object diagram contains primarily objects and links. Deployment diagrams may also occur in generic and instance forms: General deployment diagrams describe node types, and instance deployment diagrams describe a concrete configuration of node instances described by those types.
You use object diagrams to model the static design view or static process view of a system just as you do with class diagrams, but from the perspective of real or prototypical instances. This view primarily supports the functional requirements of a systemthat is, the services the system should provide to its end users. Object diagrams let you model static data structures.
|
Design views are discussed in Chapter 2 . |
When you model the static design view or static interaction view of a system, you typically use object diagrams to model object structures.
|
Interaction diagrams are discussed in Chapter 19 . |
Modeling object structures involves taking a snapshot of the objects in a system at a given moment in time. An object diagram represents one static frame in the dynamic storyboard represented by an interaction diagram. You use object diagrams to visualize, specify, construct, and document the existence of certain instances in your system, together with their relationships to one another. You can show dynamic behavior and execution as a sequence of frames.