![Hands-On Design Patterns with Java](https://wfqqreader-1252317822.image.myqcloud.com/cover/688/36698688/b_36698688.jpg)
上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:
![](https://epubservercos.yuewen.com/A2D5A8/19470379708814006/epubprivate/OEBPS/Images/02c0bb8a-b783-4171-a9aa-075387ae52e3.png?sign=1739046450-enBAo3WxTwvMQZ005afUmuOgG4ZVPSYh-0-436b8d30608edb2b03b9930b213b35de)
A sample object diagram