Use Case View  «Prev  Next»
Lesson 8Building the use case diagram
ObjectiveBuild a use case diagram based on user interviews.

Building the Use Case Diagram based on user Interviews

You saw all the use case diagram notation in the previous lessons.
What you have not seen is how to build the diagram using a problem description. Use the simulation applet to step through a sample build process for the use case diagram using the following problem statement.

Conducting the User Interview

Our bank wants to redesign our checking account system to find opportunities to take advantage of new technologies. By improving the system, we hope to provide our customers with more options for using their checking accounts.
"Currently, customers are required to use our tellers to make deposits and withdrawals. With ATMs and home banking, customers should be able to perform these transactions themselves. Furthermore, we should be able to make transfers between checking and savings types of accounts simpler too. Our bank staff will still need to be able to make adjustments. You know how unreliable computer systems are."
"Please do not forget that our preferred customers do not have any holds placed on their deposits. All preferred customer deposits clear immediately. It would be a disaster if the new system changed this rule."

What the UML describes is a use case diagram, which shows how use cases relate to each other. But almost all the value of use cases lies in the content, and the diagram is of rather limited value.
UML is silent on the content of a use case but does provide a diagram format for showing them, as in Figure 1. Although the diagram is sometimes useful, it is not mandatory. In your use case work, do not put too much effort into the diagram. Instead, concentrate on the textual content of the use cases.
Use Case Diagram
Figure 1: Use Case Diagram
The best way to think of a use case diagram is that it is a graphical table of contents for the use case set. It is also similar to the context diagram used in structured methods, as it shows the system boundary and the interactions with the outside world. The use case diagram shows the actors, the use cases, and the relationships between them:
  1. Which actors carry out which use cases
  2. Which use cases include other use cases
  3. The UML includes other relationships between use cases beyond the simple includes, such as extend.
I strongly suggest that you ignore them. I've seen too many situations in which teams can get terribly hung up on when to use different use case relationships, and such energy is wasted. Instead, concentrate on the textual description of a use case; that's where the real value of the technique lies.

Building the Use Case Diagram

View the diagram below to understand which steps are involved in building the use case
1) Withdraw Money, 2) Adjust Account
Checking Account System: 1) Withdraw Money, 2) Adjust Account

Here are the steps required to build the use case diagram:
  1. First, set the context of the target system. Click the System button to add the system icon to the diagram.
  2. Now double-click on the new system icon to add its name.
  3. Identify the actors. Click the Actor:person button to add actors.
  4. Double-click either actor to add its name.
  5. Click the Actor:system button to add another actor.
  6. Double-click the new actor to add its name.
  7. Identify the use cases. Add three use cases by clicking the Use Case button.
  8. Double-click on any use case to add its name.
  9. Define the associations between actors and use cases. Click the Association button to add associations connecting all the actors to their appropriate use cases.
  10. Evaluate the actors and use cases to find opportunities for refinement. Click the Actor:person button to add a Preferred Customer actor.
  11. Now click the Use Case button to add a Preferred Customer use case.
  12. Click the Association button to add an association connecting the new actor and use case.
  13. Evaluate the use cases to find opportunities for delegation. First, add associations between use cases by clicking the Association button.
  14. Now, double-click either new association to add the <<Uses>> stereotype.
  15. Evaluate the use cases for special cases. First, add associations between Deposit Money and Preferred Customer Deposit by clicking the Association button.
  16. Double-click on the new association to add the <<Extends>> stereotype.
  17. This completes the use case diagram.
In the next lesson, the use case narrative will be discussed.

Steps in building a use case diagram

Correct order of steps for building a use case diagram.
  1. Set the context of the target system. Context always comes first. Without it, there is no frame of reference for the information you are evaluating.
  2. Identify the actors. Find the people, systems, or devices that communicate with the system. These users will become your source for finding and validating the required features of the system. This should be a first-draft effort only.
  3. Identify the use cases. Find the features that the system provides. What does the system help the actor(s) do? What does the system tell the actor? What does the actor help the system do? This should be a first-draft effort only.
  4. Define the associations between actors and use cases. Identify which actors need access to which features. This should be a first-draft effort only.
  5. Evaluate the actors and use cases to find opportunities for refinement. Rename, merge, and split actors and use cases as needed. Update the related associations.
  6. Evaluate the use cases to find opportunities for delegation. Apply the <<Uses>> association stereotype between the use cases.
  7. Evaluate the actors and use cases for special cases. Apply the <<Extends>> association stereotype.

Use Case diagram example

  1. Use Case diagram: A diagram that shows the relationships among actors and use cases (features) within a system.
  2. use case instance: The performance of a sequence of actions being specified in a use case.
  3. use case model: A model that describes a system's functional requirements in terms of use cases, use case narratives, and scenarios.

Use Case diagram example
Use Case diagram Example

Build Use Case - Exercise

Click the Exercise link below to build the use case diagram for the course project.
Build Use Case - Exercise