Exercise 2.11: Documenting the analysis classes

In this exercise, you complete the PiggyBank domain model by documenting the main classes in the PiggyBank online banking system. You document the key abstraction, key control, and main user interface classes by creating diagrams that use the existing account operations analysis elements.

You can create a simple class reference by documenting the main PiggyBank analysis elements. These diagrams are derived from the use case realization participant diagrams that you created in the previous exercises. You have already created the PiggyBank domain model. You now create the PiggyBank Analysis Views, PiggyBank Key Abstractions, PiggyBank Key Controllers, and PiggyBank UI classes.

Modeling is an iterative process. At this point in the process, you should have discovered all the classes that comprise the PiggyBank online banking system. Even though the analysis model is already complete, completing this exercise is a good way to organize the analysis elements and to determine whether or not you modeled your complete system effectively. A good way to understand the basic structure of your system is to organize your classes into diagrams.

Creating the PiggyBank Key Controllers diagram

You now create the PiggyBank Key Controllers diagram. This diagram describes all of the control classes in the PiggyBank online banking system.

To create the PiggyBank Key Controllers diagram:
  1. In the Model Explorer view, expand Analysis Model, expand «perspective» Overviews, right-click ${project} Key Controllers; then click Find/Replace.
  2. In the Find what field, type ${project} and click Replace.
  3. In the Replace with field, type PiggyBank and click OK.
  4. Double-click the PiggyBank Key Controllers diagram.
  5. In the Model Explorer view, expand Account Operations and expand Account Operations Analysis Elements.
  6. In the Model Explorer view, click the CashCheckControl analysis element and drag it into the diagram.
  7. In the Model Explorer view, click the TransferMoneyControl analysis element and drag it into the diagram.

You created the PiggyBank Key Controllers diagram in the «perspective» Overviews package. This diagram shows the main control classes in the PiggyBank online banking system. Your diagram should look similar to the following figure:

The PiggyBank Key Controllers diagram

Creating the PiggyBank Key Abstractions diagram

You now create the PiggyBank Key Abstractions diagram. This diagram describes the key functional abstractions of the PiggyBank online banking system.

To create the PiggyBank Key Abstractions diagram:
  1. In the Model Explorer view, expand Analysis Model, expand «perspective» Overviews, right-click ${project} Key Abstractions; then click Find/Replace.
  2. In the Find what field, type ${project} and click Replace.
  3. In the Replace with field, type PiggyBank and click OK.
  4. Double-click the PiggyBank Key Abstractions diagram.
  5. In the Model Explorer view, expand Account Operations and expand Account Operations Analysis Elements.
  6. In the Model Explorer view, click the Account analysis element and drag it into the diagram.
  7. In the Model Explorer view, click the CityBank analysis element and drag it into the diagram.
  8. In the Model Explorer view, click the CashCheckControl analysis element and drag it into the diagram.
  9. In the Model Explorer view, click the TransferMoneyControl analysis element and drag it into the diagram.

You have created the PiggyBank Key Abstractions diagram in the «perspective» Overviews package. Your diagram should look similar to the following figure:

The PiggyBank Key Abstractions diagram

Creating the PiggyBank UI diagram

You now create the PiggyBank UI diagram. This diagram describes the main user interface elements in the PiggyBank online banking system. User interface classes usually derive from boundary classes that are named as forms.

To create the PiggyBank UI diagram:
  1. In the Model Explorer view, expand Analysis Model, expand «perspective» Overviews, right-click ${project} UI; then click Find/Replace.
  2. In the Find what field, type ${project} and click Replace.
  3. In the Replace with field, type PiggyBank and click OK.
  4. Double-click the PiggyBank UI diagram.
  5. In the Model Explorer view, expand Account Operations and expand Account Operations Analysis Elements.
  6. In the Model Explorer view, click the TransferMoneyForm analysis element and drag it into the diagram.
  7. In the Model Explorer view, click the CashCheckSummaryForm analysis element and drag it into the diagram.
  8. In the Model Explorer view, click the DisplayBalanceForm analysis element and drag it into the diagram.
  9. In the Model Explorer view, click the CashCheckForm analysis element and drag it into the diagram.
  10. In the Model Explorer view, click the TransferMoneySummaryForm analysis element and drag it into the diagram.

You have created the PiggyBank Key UI diagram in the «perspective» Overviews package. Your diagram should look similar to the following figure:

The PiggyBank UI class diagram

Creating the PiggyBank Analysis Views diagram

You now create the PiggyBank Analysis Views diagram which is an overview of the Piggybank overview diagram that you can use to view and navigate to all the PiggyBank overview diagrams. The diagram contains links that reference the existing diagram classes in the analysis model template.

To create the PiggyBank Analysis Views diagram:
  1. In the Model Explorer view, expand Analysis Model, expand «perspective» Overviews, right-click ${project} Analysis Views; then click Find/Replace.
  2. In the Find what field, type ${project} and click Replace.
  3. In the Replace with field, type PiggyBank and click OK.

You have created the PiggyBank analysis model. In the analysis model, you modeled the static and dynamic behavior of the system by realizing the use cases that you created in Module 1: Creating the use case model. In Module 3: Creating the design model, you build on the analysis model to begin the design of the PiggyBank online banking system application.

To continue, proceed to Module 3: Creating the design model.

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