Object Diagram: Click To Edit Master Subtitle Style
Object Diagram: Click To Edit Master Subtitle Style
5/8/12
What is a UML Object Diagram? Object diagrams are also closely linked to class diagrams. Just as an object is an instance of a class, an object diagram could be viewed as an instance of a class diagram. Object diagrams describe the static structure of a system at a particular time and they are used to test the accuracy of class diagrams. 5/8/12
Object diagram
UML 2 Object diagrams (instance diagrams), are useful for exploring real world examples of objects and the relationships between them.It shows instances instead of classes. They are useful for explaining small pieces with complicated relationships, especially recursive relationships.
5/8/12
Object Diagrams
Object Diagrams describe the static structure of a system at a particular time. Whereas a class model describes all possible situations, an object model describes a particular situation. Object diagrams contain the following elements: Objects, which represent particular entities. These are instances of classes.
Links, which represent particular relationships between objects. These are instances of associations.
5/8/12
Each object is represented as a rectangle, which contains the name of the object and its class underlined and separated by a colon.
5/8/12
5/8/12
Object attributes As with classes, you can list object attributes in a separate compartment. However, unlike classes, object attributes must have values assigned to them.
5/8/12
5/8/12
Active object Objects that control action flow are called active objects. Illustrate these objects with a thicker border.
5/8/12
5/8/12
Multiplicity You can illustrate multiple objects as one symbol if the attributes of the individual objects are not important.
5/8/12
5/8/12
Links Links are instances of associations. You can draw a link using the lines used in class diagrams.
5/8/12
5/8/12
ObjectDiagram
Object Diagram shows the relationship between objects. Unlike classes objects have a state.
5/8/12
1515
can
contain
Often, the relationship details and multiplicity rules found in the Class diagram are left out to concentrate the diagram on the Objects and their properties Associations between Objects are simply diagrammed using a line 5/8/12 joining the two
OBJECT
Objects are represented by placing the instance name followed by a colon (:) in front of the class name Property values are "name=value" pairs written as
The icon for an object is a rectangle divided into sections, as seen in the figure to the right
5/8/12
Object diagram
5/8/12
Object diagram
5/8/12