Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is "Derived attributes" in a Class Diagram?

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)?

like image 370
user160677 Avatar asked Aug 31 '09 14:08

user160677


1 Answers

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

like image 64
Jordi Cabot Avatar answered Sep 25 '22 00:09

Jordi Cabot