Architecting and designing : UML 2.0 Lite : UML models : UML class diagrams : Methods and operations : Adding parameters for a method
  
Adding parameters for a method
Parameters are added to a method by specifying them within the Parameters grid in the method's definition. (You are not allowed to type parameters in the Methods grid of a class definition: you must open the full definition of the method.)
1 In the definition dialog of the class, go to the Methods tab, and in the Methods grid, type the name of the method, and then press Enter.
The method’s full definition dialog appears.
2 Go to the Formal Parameters tab of the definition, and in the Parameters grid, type the name of the first parameter. To enter it, press Enter, or tab to the next cell, or click in the next cell.
In the Type cell, specify the type of the parameter.
Specifying Parameter Types:
A parameter must have a return type. The return type declares the type of the return value. There are two basic types:
Primitive types: Every language (Java, C++, Visual Basic, CORBA IDL Properties for a Class Method, and so on) has a standard set of primitive types. In the Type property of a method parameter, you are provided with a filtered list that shows simply the primitive types of the language declared for that class.
Reference types: Reference types are class types, interface types, and array types. To select a reference type, right‑click in the Type cell for a method parameter, and then click Choices. Drag the classes into the cell.
or,
3 Click Choices to open a list of the parameters that are already in the encyclopedia. The parameters are in this format:
parameter_name.package_name.class_name.method_name
Drag a parameter into the new method; a copy of the parameter is made, and it belongs to the new method (with new owning class and package). To view the new parameter’s ownership, click Define, and then click the Owner tab.
4 Click OK.
Notice that in the class’s Methods grid, Formal Parameters are not listed.
To show or hide method formal parameters, see Display of method formal parameters.
See also
Methods and operations