Sequence diagrams
From SoftwarePractice.org
Contents |
[edit]
Useful links
[edit]
Tutorial
In this tutorial, you will be working with the CRC cards you created in the last tutorial and the use cases you started on a few weeks ago.
In overview, the tutorial asks you to firstly identify sets of collaborating classes, and then to locate use cases in which those classes will be engaged. You will firstly create collaboration diagrams for them, and then develop sequence diagrams.
This is a hard tutorial, so try to focus on getting your head around the concepts and actively seek feedback from the instructor.
- Locate collaborating objects. Based on your CRC cards, identify sets of collaborating classes. (While obviously all classes will collaborate, you are looking for sets that appear to work closely with each other.) You should be able to identify three or four sets. (Some classes can appear in more than one set.)
- Locate use cases. Look through your use cases and identify those that make use of the sets of classes.
- Create collaboration diagrams. On a sheet of paper, create object instances of each class in a set. Then pick a suitable use case, and, using a user action as the first operation, draw out the subsequent interaction between the objects. If you need to create additional instances of a particular class, you can modify the diagram accordingly. You should try and create at least three collaboration diagrams.
- Create sequence diagrams. For each collaboration diagram, draw "swimlanes" for each object, and redraw the same behavior on the sequence diagram. Don't worry too much about whether or not the diagrams are "right" at this point -- your goal is to make sure that you understand the notation so that your team can make progress on the UML models outside of regular class time.
- Follow-up. Continue to refine your sequence diagrams with your team over the next few weeks. You may find that this works triggers some revisions to your class diagrams and use cases.
