Definition: An attribute is the abstraction of a single characteristic possessed by all the entities that were, themselves, abstracted as a class. The goal is to obtain a set of attributes for a class that is:
5.2.1 Finding AttributesFor each class, start out by asking yourself, "What characteristics do all the things in the domain possess (that we care about)?" Another approach is to go back to the abstraction and ask, "What information is inherent to this abstraction that makes the abstraction what it is?" Attributes fall into three informal categories: descriptive, naming, and referential. These categories are offered only as a way to ease finding attributes for classes. A descriptive attribute is an attribute that describes an intrinsic characteristic of the thing, such as the amount of the order, or the customer's address. These attributes can be found by considering what describes each thing. A naming attribute is an arbitrary name or label used to refer to a thing. You can change the names or labels of each thing without changing what it is: That is, if we re-number an airplane, it is still the same airplane. Naming attributes help identify things from outside the domain. (Inside the domain, we have object references.) A referential attribute provides facts about links. For example, an Order may have a customer attribute that refers to the Customer who made the order. Referential attributes formalize associations (e.g., "the Order's Customer"), a topic we address in Chapter 6: Relationships and Associations. |