Question

I am going through a class diagram. Some attributes inside the class are marked with a slash "/" ex ( / -accountBalance:Dollar = 0 ).

When we say "derived attribute", can we mean it is Enumeration or other class instance (generally a custom data type)?

Was it helpful?

Solution

A slash in front of an attribute means that the attribute is derived. The value of a derived attribute is calculated from the value of other model elemetns in the diagram. For instance, the accountBalance value can be derived from the list of payments and deposits made for that account (assuming that information about payments and deposits is stored in other classes in the diagram).

The derivation rule for a derived attribute (i.e. how to compute its value) can be specified in natural language or more formally in OCL

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top