| Lesson 2 || Test the scenarios |
| Objective || Reconcile the sequence diagrams to the scenarios. |
Reconcile Sequence Diagram to Scenarios
Scenarios and sequences
Use case scenarios are the sources for interaction diagrams. In an earlier module, you learned how to build a sequence diagram using a single use case scenario. You have also seen that the process is designed to be iterative.
That is, you create an initial draft of each diagram, then compare and contrast the diagrams, asking probing questions to enhance and refine the diagrams.
A high-level view
The scenarios are initially very high level. In fact, they should describe only what is visible to an actor from outside the system. When the sequence diagrams are drafted, there are really only two objects, the actor and the system. In the second iteration, you add the resources that the system uses to accomplish the events assigned to it.
During design, this same process will continue as you add the software classes. You will replace the actor with user interface objects, and replace the "system" object with the software control and interface classes that make up the software.
Sequence diagram: more detailed than scenarios
Invariably, the sequence diagram will become more detailed than the scenarios. The goals and the audiences are different. The scenarios are targeted at users outside the system. The sequence diagrams are targeted at describing the system and its internal resources.
Adding detail to the sequence diagram
As you add detail to the sequence diagrams, make certain that you do not alter or lose any of the information from the scenarios without reconciling the changes to the scenarios. The two diagrams must remain in agreement throughout the enhancement process. If you add detail to the sequence diagram, then add it to the scenario, and vice versa.
Click the View Image link to view an automatic teller machine (ATM) example illustrating the process of change and reconciliation.
Note that the sequence diagram changes as the scenario is updated. The two views remain in sync, with no information loss or corruption throughout the evolution of the model.
Scenarios Sequences - Object Modeling
Enhance Scenario - Exercise