Adding operations to a use case

Because a use case is a stereotyped class, it can have operations.

Procedure

  1. Select the use case in the use-case diagram editor.
  2. Right-click the use case, and then select New Operation. The Primitive Operation window opens.
  3. Type a name for the operation in the Name field.
  4. If wanted, specify a stereotype.
  5. Select the visibility of the operation.
  6. Select a type for the operation in the Type field.
  7. Select the Return Type for the operation.
  8. Specify the operation modifiers.
  9. Add any arguments using the Arguments section.
  10. Type a description in the Description tab.
  11. Select the Implementation tab.
  12. Type the implementation code for the operation in the Implementation text box.
    Note: Code is not generated for the contents of use cases. This implementation is for descriptive purposes only.
  13. Click OK.

Feedback