3.2.7 Identifying attributes for the classes in the DVD Library System
As a by-product of our class rejection process, we have already identified a number of entities that can appropriately be modelled as attributes. A similar font and naming convention to that for classes will be applied to attributes, except that their names will start with a lower case letter.
-
Attributes of
:
,
-
Attribute of
:
-
Attributes of
:
,
-
Attributes of
:
,
To check whether there are any others, it is necessary to read through the requirements document to ensure that no information about the properties of classes has been missed. In fact, none of the classes that we have identified has any additional attributes.
For a simple system it is often possible to identify attributes in parallel with classes, particularly when all the references to attributes are nouns. But suppose a requirements document contained something like the following:
Each warehouse contains a number of bar-coded products.
Here, the term ‘bar-coded’, although it is an adjective and not a noun, points to the need for a attribute in the
class. Unless the noun ‘barcode’ appeared elsewhere in the description, this could well have been missed during the class-identification process.