HOPEX UML : HOPEX UML : The Class Diagram : Attributes : Specifying Class Attributes
   
Specifying Class Attributes
To define class attributes:
1. Right-click the class.
2. Select Attributes in the pop-up menu.
 
The attributes of the class are listed. It is possible to specify for each attribute:
Its Type, which can be expressed as an expression.
Example: Integer.
*The expression must comply with UML syntax. See "Operation or Signal Signatures" for further information.
To consult the list of possible types, click in the corresponding field and click the arrow to open the drop-down list box.
 
The list contains the types belonging to the different classes in the starting package (in this case, "Library").
To query other types, click the arrow on the right of the drop-down menu and select Query. The Query dialog box opens.
You may also enter the attribute type directly in the field.
Its Visibility:
"Public": this is the default visibility. The attribute is visible to all.
“Protected”: the attribute is visible to those inheriting its package, or to its friends.
“Private”: the attribute is visible to its class or to its friends.
Its Multiplicity, which is the number of times this attribute can be repeated in the class.
You can use the buttons in the toolbar to do the following:
 
Inherited attributes
When a generalization exists between a general class and a more specialized class, the specialized class inherits the attributes of the general class.
*Click the Inherited Attributes button to view attributes inherited from other classes.
See also "Definition: Attribute".