July 2001
Intermediate to advanced
656 pages
15h 51m
English
There are some things that should not be represented as attributes, but rather as associations. This section explores valid attributes.
Intuitively, most simple attribute types are what are often thought of as primitive data types, such as numbers. The type of an attribute should not normally be a complex domain concept, such as a Sale or Airport. For example, the following currentRegister attribute in the Cashier class in Figure 12.2 is undesirable because its type is meant to be a Register, which is not a simple attribute type (such as Number or String). The most useful way to express that a Cashier uses a Register is with an association, not with an attribute..
Read now
Unlock full access