What is Object Diagram?
6-8 minutes
Object is an instance of a class in a particular moment in runtime that can have its own state and data values. Likewise a static UML object diagram is an instance of a class diagram ; it shows a snapshot of the detailed state of a system at a point in time, thus an object diagram encompasses objects and their relationships which may be considered a special case of a class diagram or a communication diagram .
Are you looking for a Free UML tool for learning UML faster, easier and quicker? Visual Paradigm Community Edition is a UML software that supports all UML diagram types. It is an international award-winning UML modeler, and yet it is easy-to-use, intuitive &completely free.
Free Download
Purpose of Object Diagram
The use of object diagrams is fairly limited, mainly to show examples of data structures.
During the analysis phase of a project, you might create a class diagram to describe the structure of a system and then create a set of object diagrams as test cases to verify the accuracy and completeness of the class diagram.
Before you create a class diagram, you might create an object diagram to discover facts about specific model elements and their links, or to illustrate specific examples of the classifiers that are required.
Object Diagram at a Glance
An object diagram shows this relation between the instantiated classes and the defined class, and the relation between these objects in the system. They are be useful to explain smaller portions of your system, when your system class diagram is very complex, and also sometimes modeling recursive relationship in diagram.
The best way to illustrate what an object diagram look like is to show the object diagram derived from the corresponding class diagram.
The following Order Management System shows their relationships. This small class diagram shows that a university Department can contain lots of other Departments and the object diagram below instantiates the class diagram, replacing it by a concrete example.
Class to Object Diagram Example – Order System
Basic Object Diagram Symbols and Notations
Object Names :
- Every object is actually symbolized like a rectangle, that offers the name from the object and its class underlined as well as divided with a colon.
Object Attributes :
- Similar to classes, you are able to list object attributes inside a separate compartment. However, unlike classes, object attributes should have values assigned for them.
Links:
- Links tend to be instances associated with associations. You can draw a link while using the lines utilized in class diagrams.