UML Object Diagram
Object diagrams are dependent on the class diagram as they are derived from the class diagram. It represents an instance of a class diagram. The objects help in portraying a static view of an object-oriented system at a specific instant.
Both the object and class diagram are similar to some extent; the only difference is that the class diagram provides an abstract view of a system. It helps in visualizing a particular functionality of a system.
Notation of an Object Diagram
Purpose of Object Diagram
The object diagram holds the same purpose as that of a class diagram. The class diagram provides an abstract view which comprises of classes and their relationships, whereas the object diagram represents an instance at a particular point of time.
The object diagram is actually similar to the concrete (actual) system behavior. The main purpose is to depict a static view of a system.
Following are the purposes enlisted below:
- It is used to perform forward and reverse engineering.
- It is used to understand object behavior and their relationships practically.
- It is used to get a static view of a system.
- It is used to represent an instance of a system.
Example of Object Diagram
How to draw an Object Diagram?
- All the objects present in the system should be examined before start drawing the object diagram.
- Before creating the object diagram, the relation between the objects must be acknowledged.
- The association relationship among the entities must be cleared already.
- To represent the functionality of an object, a proper meaningful name should be assigned.
- The objects are to be examined to understand its functionality.
Applications of Object diagrams
The following are the application areas where the object diagrams can be used.
- To build a prototype of a system.
- To model complex data structures.
- To perceive the system from a practical perspective.
- Reverse engineering.
Class vs. Object diagram
||It depicts the static view of a system.
||It portrays the real-time behavior of a system.
||Dynamic changes are not included in the class diagram.
||Dynamic changes are captured in the object diagram.
||The data values and attributes of an instance are not involved here.
||It incorporates data values and attributes of an entity.
||The object behavior is manipulated in the class diagram.
||Objects are the instances of a class.