Username:
Password:
UML Tutorials

Use Case Diagrams / A Use Case Diagram for an ATM

Subtitles of the Movie

Let's look at our automated teller example to see how we might start to capture the various use cases in a given system. So we'll start by drawing our system and we'll call it ATM and we will identify an actor who wants to interact with that ATM and we'll call that actor the customer. So what goals might a customer have in interacting with an ATM system? Let's see what use cases we can identify, withdraw cash, the customer might want to make a deposit. Customer might want to check the balance in an account and the customer also might want to transfer funds. You might be able to think of a few more but these will suit our purposes for now. So in each of these cases the customer is the primary actor who has these various goals in interacting with the ATM. So to show that we want to make an association between the customer and each of these different use cases. Now looking at that we might want to ask who else interacts with ATM and it doesn't take very long to think of another actor. For example somebody has to perform maintenance on the machine so the way to phrase the use case, the goal that the maintenance person might have in interacting with the machine could be something like perform routine maintenance. Now the maintenance person, not the customer is the initiator of this use case so we'll indicate that by drawing a line from maintenance, the maintenance person to perform the routine maintenance use case, we have an association between this actor and this use case. And also when you think about it the customer can't withdraw cash unless somebody puts cash in it, we'll call that person the stocker and the stocker's goal is to fill ATM with cash. And again there is an association that indicates that this actor is the primary actor in this use case. So now we have our system, we have three different actors we've identified and we have various goals that are associated with the different actors. The next thing we want to ask is, is there any other actor that comes into play in order for a particular use case to successfully finish and if we look at these, the customer use cases withdraw cash, deposit funds, check balance and so on, for each of those we do need a secondary actor. The ATM needs to talk with the bank system in order for each of these goals to be achieved, so we also have associations from these use cases to this secondary actor. Now sometimes it's helpful to identify secondary actors, sometimes you don't need them. What you want to do is look at your diagram and ask, is this easy to understand? Is it getting too cluttered? Is it clear that the customer is the initiator here and that the bank system comes into play once the use case has been initiated? And in this simple diagram that is clear. So one way that you can show this is to have the primary actors on the left side of the diagram and the secondary actors on the right.

Tutorial Information

Course: UML
Author: Nancy Conner
SKU: 33815
ISBN: 1-934743-23-2
Release Date: 2007-10-26
Duration: 7 hrs / 95 lessons
Captions: For Online University members only
Compatibility: Vista/XP/2000, OS X, Linux
QuickTime 7, Flash 8

VTC Sign up & Benefits

  • Unlimited Access
  • 81,350 Video Tutorials (20,800 free)
  • Video Available as Flash or QuickTime
  • Over 782 Courses
  • $30 for One Month Access
  • Multi-User Discounts Available