Exercise 1.3: (Optional) Identifying the use cases

In this exercise, you identify the significant use cases in the PiggyBank online banking system. The use cases describe the functional tasks that the PiggyBank application performs.

The use cases define the most basic functional tasks that the users of the application perform. In the PiggyBank online banking system, customers can display the balance of their accounts and transfer money from one account to another. Only a teller can cash a check; however, the system must verify that the transaction is valid.

Creating a functional area

To create the use case diagram, you must first identify the functional area. Because all use cases are related to banking activities, the functional area is called Account Operations.

To create a functional area:
  1. In the Model Explorer view, expand Use Case Model, expand «ModelLibrary» Use-Case Building Blocks, press CTRL and drag the ${functional.area} package into the root level of the use case model.
  2. Right-click ${functional.area}; then click Find/Replace.
  3. In the Find what field, type ${functional.area} and click Replace.
  4. In the Replace with field, type Account Operations and click OK.

You now have a functional area. The functional area represents the most basic building block of the use case model. You can now populate the functional area with use cases.

Creating the use case elements

After you identify the functional area, you can import the use cases and begin to build the use case model.

To create the use case model elements:
  1. In the Model Explorer view, expand Account Operations and double-click the Account Operations Use Cases diagram.
  2. In the diagram editor, right-click the note; then click Delete from diagram.
  3. In the Palette, double-click Use Case, type Display Balance, and then position the use case near the top of the diagram editor.
  4. In the Palette, double-click Use Case, type Transfer Money, and then position the use case element below the Display Balance use case.
  5. In the Palette, double-click Use Case, type Cash check, and then position the use case element below the Transfer money use case.
Note: The use case model template contains existing use cases and actors to help you create use case diagrams. Instead of creating new use case elements using the Palette, you can copy the existing elements into your functional area and rename them. To copy the existing use case elements, in the Model Explorer view, in the «ModelLibrary» Use-Case Building Blocks package, right-click an analysis element; then click Copy. Right-click your functional area; then click Paste.

(Optional) Documenting the use cases

The use case model template contains an overview package called «perspective» Overviews that provides additional documentation about the model. Although this step is optional and does not impact the model, you should organize and document the actors and use cases in the PiggyBank online banking system.

To document the use cases:
  1. In the Model Explorer view, expand «perspective» Overviews, right-click Context Diagram; then click Refactor > Rename.
  2. To rename the diagram, type Architecturally Significant Use Cases and press Enter. This diagram will contain a list of all main use cases in the project.
  3. Double-click Architecturally Significant Use Cases.
  4. In the Model Explorer view, expand the Account Operations folder and drag the Display Balance, Transfer money, and Cash check use case elements into the diagram editor.
  5. Arrange the use cases vertically in the center of the diagram, as you did for the use case diagram in the previous step.

You have increased the readability of this use case model by documenting the project’s significant use cases. You can add a title to the diagram by using the text tool. Your project should now look similar to the following figure:

The Model Explorer view showing the PiggyBank use case model.

Because this model contains only one functional area, you can remove the «ModelLibrary» Use-Case Building Blocks project from your project. You no longer need this empty package and it clutters the model hierarchy. To delete the package, right-click, then click Delete.

Now you are ready to begin Exercise 1.4: Identifying actors.

Terms of use | Feedback
(C) Copyright IBM Corporation 2004, 2005. All Rights Reserved.