Chapter 3 Building Structural Diagrams
An object diagram is a UML diagram that describes the structure of model elements and not their behavior or temporary information. The object diagram represents instances of classes (objects), instances of association (instance links), and dependencies. However, it does not represent inheritance relationships.
As a diagram of instances, the object diagram shows an example of data structures with data values that corresponds to a detailed situation of the system at a particular point in time.
The object diagram can be used for analysis purposes: constraints between classes that are not classically represented in a class diagram can typically be represented in an object diagram.
If you are novice in object modeling, instances usually have more meaning than classifiers do, because classifiers represent a level of abstraction. Gathering several instances under the same classifier helps you to understand what classifiers are. Moreover, even for analysts used to abstraction, the object diagram can help understand some structural constraints that cannot be easily graphically specified in a class diagram.
In this respect, the object diagram is a limited use of a class diagram. For example, see the following figures representing a class and an object diagram: the class diagram specifies that a class Writer is linked to a class Document.
The object diagram, deduced from this class diagram, highlights some of the following details: the object named John, instance of the class Writer is linked to two different objects Draft and Master that are both instances of the class Document.
Dragging classes and associations to an object diagram
You can drag classes and associations from the Browser and drop them into an object diagram. If you drag classes, new objects as instances of classes are created. If you drag an association, a new instance link as instance of the association, and two objects are created.
Copyright (C) 2006. Sybase Inc. All rights reserved. |