Exercise 2.7: Creating the Transfer Money Participants diagram

In this exercise, you create the Transfer Money Participants diagram. The Transfer Money Participants diagram models the static structure of the Transfer Money use case.

The Transfer Money Participants diagram shows the classes that participate in the Transfer Money use case. You model the participants, along with their relationships, to describe the domain of the system. In addition to entities, and boundary classes, the Transfer Money Participants diagram contains the TransferMoneyControl control class. Control classes represent the implementation of business rules or logic. A control class represents a self-contained process that interacts with boundary classes. Boundary classes are used to abstract the control classes from entities.

Modeling is an iterative process. You can add, remove, or modify 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 Transfer Money participants diagram. You add the remaining details of the diagram when you create the Transfer Money sequence diagram in the next exercise.

Creating the diagram and modeling the Account, Transfer, and MenuForm participant

You create the Transfer Money 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» Transfer Money, and double-click the «use case realization» Transfer Money Participants 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 Transfer class, and drag it into the diagram.
  4. In the Model Explorer view, expand Account Operations Analysis Elements, click the MenuForm class and drag it into the diagram.

You have started the Transfer Money Participants diagram by reusing the classes that you created in the Display Balance use case realization. Many of the same classes are used in more than one functional area. You created the Account, Transfer, and MenuForm classes in the Display Balance use case realization.

Creating the TransferMoneyControl participant

The TransferMoneyControl participant is a control class that represents the business logic of the Transfer Money functional area.

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

Creating the TransferMoneyForm participant

The TransferMoneyForm participant is a boundary class that represents the money transfer form that is displayed when the user clicks Transfer Money on the main menu.

To create the TransferMoneyForm participant:
  1. In the Palette, double-click Class and name the class TransferMoneyForm.
  2. In the diagram editor, click the TransferMoneyForm class and, in the Properties view, on the Stereotypes page, click Add Stereotypes.
  3. In the Apply Stereotypes window, click Boundary, and click OK.
You have created all the participants in the Transfer Money use case. You must now model the relationships that exist between the classes.

Modeling the TransferMoneyControl participant relationships

Because the TransferMoneyControl 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 TransferMoneyControl class relationships.

To model the relationships of the TransferMoneyControl class:
  1. In the Palette, beside Instantiate, click the down arrow and click Usage.
  2. In the diagram editor, place the cursor over the TransferMoneyControl class and drag it to the Account class.
  3. In the Palette, beside Usage, click the down arrow and click Instantiate.
  4. In the diagram editor, place the cursor over the TransferMoneyControl class and drag it to the Transfer class.
  5. In the Palette, click the Instantiate element.
  6. In the diagram editor, place the cursor over the TransferMoneyControl class and drag it to the TransferMoneySummaryForm class.

Modeling the MenuForm and TransferMoneyForm participant relationships

The MenuForm and TransferMoneyForm boundary classes depend on the TransferMoneyControl class.

To create the MenuForm participant relationships:
  1. In the Palette, click the Instantiate element.
  2. In the diagram editor, place the cursor over the MenuForm class and drag it to the TransferMoneyForm class.
  3. In the Palette, beside Instantiate, click the down arrow and click Usage.
  4. In the diagram editor, place the cursor over the TransferMoneyForm class and drag it to the TransferMoneyControl class.

You have created the basic outline of the Transfer Money participants diagram. Your diagram should look similar to the following figure:

A domain diagram that describes the basic static structure of the Transfer Money participants diagram.
Terms of use | Feedback
(C) Copyright IBM Corporation 2004, 2005. All Rights Reserved.