Skip to main content Accessibility help
×
Hostname: page-component-848d4c4894-xfwgj Total loading time: 0 Render date: 2024-06-28T00:06:40.607Z Has data issue: false hasContentIssue false

13 - UML Object Diagrams

Published online by Cambridge University Press:  17 December 2010

Scott W. Ambler
Affiliation:
Ronin International
Get access

Summary

UML object diagrams depict instances and their relationships at a point in time. You create a UML object diagram to

  1. ■ explore “real-world” examples of objects and the relationships between them;

  2. ■ explain complex relationships between classes to people who find class diagrams too abstract;

  3. ■ become input into creating a UML class diagram.

Indicate Attribute Values to Clarify Instances

Figure 52 depicts a UML object diagram, taken from The Object Primer 3rd Edition (Ambler 2004), which explores the relationships between students and seminars. The student objects have been given understandable names, such as John Smith and Sally Jones, which immediately identify them. The seminar objects also have understandable names, such as CSC 100a, but also have attribute values such as Term = “Fall” to clarify which seminar is truly meant.

Prefer Object Names over Attribute Values

Whenever possible try to find a good, understandable name for an object without resorting to indicating attribute values. This makes your object diagrams concise.

Indicate Roles to Distinguish Different Relationships

In Figure 52 you see that it is possible for students to be both teaching assistants and simply students of a seminar; for example, Sarah McGrath is a teaching assistant in CSC 100b, whereas Scott Ambler is a student of that seminar. Identifying roles in this manner can help you to identify different associations between the same classes.

Type
Chapter
Information
Publisher: Cambridge University Press
Print publication year: 2005

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Save book to Kindle

To save this book to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

  • UML Object Diagrams
  • Scott W. Ambler
  • Book: The Elements of UML™ 2.0 Style
  • Online publication: 17 December 2010
  • Chapter DOI: https://doi.org/10.1017/CBO9780511817533.014
Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

  • UML Object Diagrams
  • Scott W. Ambler
  • Book: The Elements of UML™ 2.0 Style
  • Online publication: 17 December 2010
  • Chapter DOI: https://doi.org/10.1017/CBO9780511817533.014
Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

  • UML Object Diagrams
  • Scott W. Ambler
  • Book: The Elements of UML™ 2.0 Style
  • Online publication: 17 December 2010
  • Chapter DOI: https://doi.org/10.1017/CBO9780511817533.014
Available formats
×