27.6. Derived Elements

A derived element can be determined from others. Attributes and associations are the most common derived elements. When should derived elements be shown?

Avoid showing derived elements in a diagram, since they add complexity without new information. However, add a derived element when it is prominent in the terminology, and excluding it impairs comprehension.

For example, a Sale total can be derived from SalesLineItem and ProductSpecification information (see Figure 27.12). In the UML, it is shown with a “/” preceding the element name.

Figure 27.12. Derived attribute.

As another example, a SalesLineItem quantity is actually ...

Get Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and the Unified Process, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.