Exercise 2.9: Creating the Cash Check participants diagram

In this exercise, you create the Cash Check participants diagram. The Cash Check participants diagram models the static structure of the Cash Check use case.

The Cash Check participants diagram shows the classes that participate in the Cash Check use case. You model the participants, along with their relationships, to describe the domain of the system. The sequence diagram describes the dynamic information that is necessary to understand the temporal flow of data. When you create the sequence diagram, you discover all the operations in each class in the use case.

Modeling is an iterative process. You can add, remove, or modify the participants at any time as you better understand the details of the system that you are modeling. In this tutorial, you create the basic outline of the Cash Check participants diagram.

Creating the diagram and modeling the Account participant

You create the Cash Check participants diagram in the Account Operations package.

To create the diagram and model the Account class:
  1. In the Model Explorer view, expand Analysis Model, expand Account Operations, expand «use case realization» Cash Check, and double-click the «use case realization» Cash Check diagram.
  2. In the Model Explorer view, expand Account Operations Analysis Elements, click the Account class, and drag it into the diagram.
  3. In the Model Explorer view, expand Account Operations Analysis Elements, click the MenuForm class, and drag it into the diagram.

You have started the Cash Check participants diagram. The Cash Check participants diagram shows the static structre of the Cash Check use case.

Creating the CashCheckControl participant

The CashCheckControl participant is a control class that represents the business logic of the Cash Check functional area.

To create the CashCheckControl participant:
  1. In the Palette, double-click Class and name the class CashCheckControl.
  2. Position the CashCheckControl participant in the center of the diagram.
  3. In the diagram editor, click the CashCheckControl class and, in the Properties view, on the Stereotypes page, click Add Stereotypes.
  4. In the Apply Stereotypes window, select the Control check box, and click OK.

Creating the CashCheckForm participant

The CashCheckForm participant is a boundary class that represents the money transfer form that is displayed when the user clicks Cash Check on the main menu.

To create the CashCheckForm participant:
  1. In the Palette, double-click Class and name the class CashCheckForm.
  2. In the diagram editor, click the CashCheckForm class and, in the Properties view, on the Stereotypes page, click Add Stereotypes.
  3. In the Apply Stereotypes window, select the Boundary check box, and click OK.

Creating the CityBank participant

The CityBank participant is a boundary class that represents the CityBank banking system that verifies PiggyBank transactions.

To create the CityBank participant:
  1. In the Palette, double-click Class and name the class CityBank.
  2. In the diagram editor, click the CityBank class and, in the Properties view, on the Stereotypes page, click Add Stereotypes.
  3. In the Apply Stereotypes window, select the Boundary check box, and click OK.
You have just created all the participants in the Cash Check use case.

Modeling the CashCheckControl participant relationships

Because the CashCheckControl participant is a control class, it is central to and depends on most of the other classes in the use case. In this exercise you create the CashCheckControl class relationships.

To model the relationships of the CashCheckControl class:
  1. In the Palette, click Usage.
  2. In the diagram editor, place the cursor over the CashCheckControl class and drag it to the Account class.
  3. In the Palette, click Usage.
  4. In the diagram editor, place the cursor over the CashCheckControl class and drag it to the CityBank class.
  5. In the Palette, click Usage.
  6. In the diagram editor, place the cursor over the CashCheckForm class and drag it to the CashCheckControl class.
  7. In the Palette, beside Usage, click the down arrow and click Instantiate.
  8. In the diagram editor, place the cursor over the CashCheckControl class and drag it to the CashCheckSummaryForm class.
  9. In the Palette, click Instantiate.
  10. In the diagram editor, place the cursor over the MenuForm class and drag it to the CashCheckForm class.

You have created the Cash Check participants diagram. This diagram shows the static structure of the Cash Check use case. Your diagram should look similar to the following figure:

The basisc outline of the Cash Check participants diagram.
Terms of use | Feedback
(C) Copyright IBM Corporation 2004, 2005. All Rights Reserved.