ibm Rational Rhapsody 7.5 — Adding attributes to a use case

Create use case diagram elements Modify the features of a use case Use the Features window to define these use case features. Љ Name allows you to replace the default name with the name you want for this use case. Љ L specifies the label for the element, if any. For information on creating labels, see Descriptive labels for elements . Љ Stereotype specifies the stereotype of the use case, if any. They are enclosed in guillemets, for example «s1» and enable you to tag classes for documentation purposes. For information on creating stereotypes, see Stereotypes . Note that the COM stereotypes are constructive; that is, they affect code generation.

Љ Default Package specifies a group for this use case. Adding attributes to a use case Because a use case is a stereotyped class, it can have attributes. No code is generated for these attributes. Rational Rhapsody does not display attributes in the UCD. To access attributes for a use case, use the browser. To add a new attribute to a use case: 1. Select the use case in the UCD editor. 2. Right-click the use case, and then select New Attribute . The Attribute window opens. 3. Type a name for the attribute in the Name field. Use the L button next to the name field to assign a logical label. For more information on labels, see Descriptive labels for elements . 4.

Select the Type , Visibility , and Multiplicity for the attribute. 5. Type a description in the Description tab. 6. Click OK . To add an existing attribute to a use case: 1. In the browser, locate the class that contains the attribute. 2. Click-and-drag the attribute to the use case in the browser. This creates a separate copy of the attribute under the use case. Note If you click-and-drag an attribute from one use case to another, the attribute is moved, not copied. Rational Rhapsody 521