Lesson 5
Logical View and Object Diagram Conclusion
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 in Action
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.
In this module, you learned the notation for the object diagram. The object diagram is used to analyze the objects in the problem domain to determine the class requirements. After the class diagram has been developed, the object diagram is used to test the class model.
Expresses possible object combinations of a specific class diagram. It is typically used to exemplify a class diagram.
Object diagrams explain and illustrate complex class diagrams. They are pictures of objects and their relationships at a specific moment in time.
Object diagrams are drawn with objects and links. Links are instances of associations and aggregations.
Because an object diagram is a snapshot, multiplicity is not shown (the actual links at that moment in time are shown instead).
Information Model
Objects
Objects are identified with a name, colon, and class name. The object name can be left off to indicate an anonymous object. The object icon consists of two compartments, one for the name and one for the attributes. Attributes are described with a name and the current value.
Operations and links
Operations are not defined on objects because every object of the same class would model identical operations, creating redundancy in the model.
Objects are connected using links. Classes are connected using associations. Links are defined with a name and optional roles. Multiplicity and constraints are not relevant with a link.
Glossary
This module introduced you to the following terms:
- Link:A relationship between two objects
- Object:A uniquely identifiable entity composed of information, behaviors, and relationships with other entities.
In the next module, we will explore the third diagram in the logical view, the activity diagram.
Object Diagram - Quiz
Click the Quiz link below to check your knowledge with a short, multiple-choice quiz addressing the lessons you have worked through in this module.
Object Diagram - Quiz