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.
Basic Object Diagram Symbols and Notations
Object names
Each object is represented as a rectangle, which contains the name of the object and its class underlined and separated by a colon.
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.
Active object
Objects that control action flow are called active objects. Illustrate these objects with a thicker border.
Multiplicity
You can illustrate multiple objects as one symbol if the attributes of the individual objects are not important.
Links
Links are instances of associations. You can draw a link using the lines used in class diagrams.
Self-linked
Objects that fulfill more than one role can be self-linked. For example, if Mark, an administrative assistant, also fulfilled the role of a marketing assistant, and the two positions are linked, Mark's instance of the two classes will be self-linked.
No comments:
Post a Comment