UML Designer User's Guide

Adding the remaining method calls

To build the rest of the sequence diagram, we need to add a series of instance method calls. For each method call, select Method call figure icon Method call, click on the source object's lifeline (within an activation), and then click on the target object's lifeline. Remember that you can resize or move activations in order to make room for method calls, and you can also move the object figures to the left or right in order to make the diagram readable.

Use the following illustration as a guide to show you how to construct the diagram.
Sequence diagram illustration (4)

The sequence diagram shows the following series of method calls:

  1. After instantiating a new CatalogEntry object, the LibraryObject uses setter methods to set the title, author, and deweyNumber attributes of the new catalog entry.
  2. Library then sends the message addCatalogEntry: to Catalog, which tells it to take the new entry, index it, and assign it an accession number.
  3. Catalog, now active, uses getter methods to retrieve the title, author, and deweyNumber attributes of the catalog entry. (At this point there would be some additional processing to index the new entry, but that behavior is not currently part of our model.)
  4. Catalog sends the message assignAccessionNumberToEntry: to itself. This method allocates a new accession number that can then be assigned to a catalog entry. Note the stacked activations on the Catalog lifeline, indicating nested method execution.
  5. Finally, Catalog sends accessionNumber: to the CatalogEntry, assigning it the newly allocated accession number.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]