Copying an Operation to Another Class

You can copy an operation from one class and add it to another. If the class already contains an operation with the same name or code as the copied operation, the copied operation is renamed. For example the operation testPort is renamed testPort2 when it is copied to a class which already contains an operation testPort.

  1. Double-click a class in the diagram to display its property sheet, and then click the Operations tab.
  2. Click the Add Operations tool to open a Selection window. This window lists all the operations attached to all the classes in the model.


  3. Select one or more operations in the list and then click OK to add the copied operations to the list of operations.
  4. Click OK.