Prev | Next |
Object Diagram
An Object diagram is closely related to a Class diagram, with the distinction that it depicts object instances of Classes and their relationships at a point in time. Object diagrams do not reveal architectures varying from their corresponding Class diagrams, but reflect multiplicity and the roles instantiated Classes could serve. They are useful in understanding a complex Class diagram, by creating different cases in which the relationships and Classes are applied
This might appear similar to a Composite Structure diagram, which also models run-time behavior; the difference is that Object diagrams exemplify the static Class diagrams, whereas Composite Structure diagrams reflect run-time architectures different from their static counterparts. An Object diagram can also be a kind of Communication diagram (which also models the connections between objects, but additionally sequences events along each path).
You generate Object diagram elements and connectors from the 'Object' pages of the Diagram Toolbox.
Example Diagram
This example shows a simple Class diagram, with two Class elements connected.
These Classes are instantiated as Objects in an Object diagram. There are two instances of Computer in this model, demonstrating the usefulness of Object diagrams in considering the relationships and interactions Classes might have in practice.
Object Diagram Element Toolbox Icons
Icon |
Description |
See also |
---|---|---|
An Actor is a user of the system; user can mean a human user, a machine, or even another system or subsystem in the model. |
Actor | |
An Object is a particular instance of a Class at run time. |
Object | |
A Collaboration defines a set of cooperating roles and their connectors. |
Collaboration | |
Use a Collaboration Use to apply a Pattern defined by a Collaboration to a specific situation, in a Composite Structure diagram. |
Collaboration Use | |
A Boundary is a stereotyped Object that models some system boundary, typically a user interface screen. |
Boundary | |
A Control is a stereotyped Object that models a controlling entity or manager. |
Control | |
An Entity is a stereotyped Object that models a store or persistence mechanism that captures the information or knowledge in a system. |
Entity | |
An n-Ary Association element is used to model complex relationships between three or more elements, typically in a Class or Object diagram. |
N-Ary Association |
Object Diagram Connector Toolbox Icons
Icon |
Description |
See also |
---|---|---|
An Information Flow represents the flow of Information Items (either Information Item elements or classifiers) between two elements in any diagram. |
Information Flow | |
An Association implies that two model elements have a relationship, usually implemented as an instance variable in one or both Classes. |
Association | |
Dependency relationships are used to model a wide range of dependent relationships between model elements in Use Case, Activity and Structural diagrams, and even between models themselves. |
Dependency |