I l @ ve RuBoard |
During analysis, it was sufficient to specify only attribute and operations names . During design, data types and initial values must be specified for attributes and operations signatures must be supplied. A data type for an attribute may be a language-supplied type such as an integer or it may be a more complex type like a String from a class library. If the attribute must be initialized to a specific value when an object of the class is created, this information is added to the class. In methodology terms, the operation signature includes the parameter list and the return class. Again, parameters and return classes must be assigned a data type. Access controlpublic, protected, and privatemust be set for attributes and operations. Attributes are typically private whereas operations may be private or public. If the class is part of an inheritance hierarchy, attributes and operations may be set to protected to allow access to subclasses. SETTING ATTRIBUTE DATA TYPES AND INITIAL VALUES IN RATIONAL ROSE
SETTING OPERATION SIGNATURES IN RATIONAL ROSE
Note Attribute and operation detail may also be set on a class diagram by selecting the displayed item and using the following format:
Some of the attribute and operation design decisions for the ESU Course Registration problem are shown in Figure 12-8. Figure 12-8. Attribute and Operation Design Details
|
I l @ ve RuBoard |