Hands-On Design Patterns with Java
上QQ阅读APP看书,第一时间看更新

Object diagrams

Object diagrams have an unfortunate name, as it does not aptly describe this UML diagram's purpose. The object diagram visually communicates a set of class instances. In fact, the instances have mostly optional components and are often only partially depicted. Therefore, a more apt name for this diagram might be a loosely defined instance UML diagram.

The following example depicts four objects and their hierarchy. Because each object is an instance of a class, it is underlined and followed by a colon and the class name:

A sample object diagram