UML Weekend Crash Course⢠- To Parent Directory
UML Weekend Crash Course⢠- To Parent Directory UML Weekend Crash Course⢠- To Parent Directory
Session 5—Understanding the Use Case Model 55 Withdraw Cash Update Account Withdraw Cash with Overdraft Protection Protect Overdraft Figure 5-6 Use Case notation for the Use Case diagram By defining Use Cases in this manner, the system is defined as a set of requirements rather than a solution. You do not describe how the system must work. You describe what the system must be able to do. The Use Cases describe only those features visible and meaningful to the actors who use the system. Keeping this in mind will help you avoid functional decomposition, the breaking down of procedures and tasks into smaller and smaller processes until you have described all the internal workings of the system. One of the pitfalls of systems development is going over budget, which happens when you don’t limit the scope of each task or you make a model too inclusive. The UML provides seven diagrams, in addition to the Use Case Model, for fully describing the solution for the system, so remember that you can save some work for later. Tip One very common question about Use Cases is, “What requirements belong on the Use Case diagram and what requirements should be explained elsewhere” The simplest answer I’ve found is, “Model only the features of the system that can be seen by an actor.” For example, the system must save data to a database, but the actor can’t actually see this happening. The most they typically see is a message indicating that it did. In this situation, the Use Case level requirement is a message indicating success or failure on the save function, not the save function itself. Use Case relationships So far, I’ve defined the system, actors, and Use Cases, but now you need to associate each user with the system features they need to perform their jobs.
56 Saturday Morning Association notation A line connecting an actor to a Use Case represents an association, as shown in Figure 5-7. The association represents the fact that the actor communicates with the Use Case. In fact, in earlier versions of the UML spec, this was called a Communicates With relationship. This is the only relationship that exists between an actor and a Use Case. According to the UML spec, you may specify a directionality arrow on either end of the association line to denote the direction of the communication. Some associations are unidirectional (for example, the actor specifies information to the Use Case). Most associations are bidirectional (that is, the actor accesses the Use Case, and the Use Case provides functionality to the actor). For bidirectional associations, you may either place an arrowhead on both ends of the association line, or simply show no arrowheads at all. For simplification, most users tend to show no arrowheads at all. Most modeling tools provide the option to turn bidirectional arrows on or off. Just remember that the key is to identify which Use Cases the actors need to access. These connections will form the basis for the interfaces of the system and subsequent modeling efforts. Customer Withdraw Cash Update Account Withdraw Cash with Overdraft Protection Protect Overdraft Figure 5-7 Association notation for the Use Case diagram Stereotype notation The stereotype notation is used throughout the UML, very commonly on Use Case dependencies, classes, and packages and other elements of the UML known as classifiers. The standard notation is to enclose the word in guillemets > (French quote marks), as in the notation below. Stereotypes provide a means to extend the UML without modifying it. A stereotype functions as a qualifier on a model element, providing more information about the role of the element without dictating its implementation. dependency notation Sometimes one Use Case may need to ask for help from another Use Case. For example, Use Cases titled Deposit Money and Withdraw Money may not actually update a bank account. They may delegate the changes to an existing Use Case called Update Account so that changes are controlled through a single feature that guarantees that all changes are done correctly.
- Page 27 and 28: PART I Friday Evening Session 1 Wha
- Page 29 and 30: 6 Friday Evening The UML is a stand
- Page 31 and 32: 8 Friday Evening will find three pa
- Page 33 and 34: 10 Friday Evening The Continuing Re
- Page 36 and 37: SESSION 2 UML and Development Metho
- Page 38 and 39: Session 2—UML and Development Met
- Page 40 and 41: Session 2—UML and Development Met
- Page 42 and 43: Session 2—UML and Development Met
- Page 44 and 45: Session 2—UML and Development Met
- Page 46 and 47: SESSION 3 How to Approach the UML S
- Page 48 and 49: Session 3—How to Approach the UML
- Page 50 and 51: Session 3—How to Approach the UML
- Page 52 and 53: Session 3—How to Approach the UML
- Page 54 and 55: Session 3—How to Approach the UML
- Page 56: Session 3—How to Approach the UML
- Page 59 and 60: 36 Friday Evening Remember to pay c
- Page 61 and 62: 38 Friday Evening Constraints The s
- Page 63 and 64: 40 Friday Evening An Inventory Cont
- Page 65 and 66: 42 Friday Evening Performance How
- Page 67 and 68: 44 Friday Evening In the effort to
- Page 70 and 71: Part II — Saturday Morning Sessio
- Page 72 and 73: SESSION 5 Understanding the Use Cas
- Page 74 and 75: Session 5—Understanding the Use C
- Page 76 and 77: Session 5—Understanding the Use C
- Page 80 and 81: Session 5—Understanding the Use C
- Page 82: Session 5—Understanding the Use C
- Page 85 and 86: 62 Saturday Morning Order Fulfillme
- Page 87 and 88: 64 Saturday Morning What does the
- Page 89 and 90: 66 Saturday Morning For example, th
- Page 91 and 92: 68 Saturday Morning REVIEW The goal
- Page 93 and 94: 70 Saturday Morning Much of this la
- Page 95 and 96: 72 Saturday Morning You reply that
- Page 97 and 98: 74 Saturday Morning Writing a Use C
- Page 99 and 100: 76 Saturday Morning Use Case dialog
- Page 101 and 102: 78 Saturday Morning Table 7-7 The F
- Page 104 and 105: SESSION 8 Identifying the Use Case
- Page 106 and 107: Session 8—Identifying the Use Cas
- Page 108 and 109: Session 8—Identifying the Use Cas
- Page 110 and 111: Session 8—Identifying the Use Cas
- Page 112 and 113: Session 8—Identifying the Use Cas
- Page 114: Session 8—Identifying the Use Cas
- Page 117 and 118: 94 Saturday Morning The Class diagr
- Page 119 and 120: 96 Saturday Morning Attribute visib
- Page 121 and 122: 98 Saturday Morning In a modeling t
- Page 123 and 124: 100 Saturday Morning Table 9-2 Cont
- Page 125 and 126: 102 Saturday Morning Operation comp
Session 5—Understanding the Use Case Model 55<br />
Withdraw Cash<br />
Update Account<br />
Withdraw Cash<br />
with Overdraft<br />
Protection<br />
Protect Overdraft<br />
Figure 5-6 Use Case notation for the Use Case diagram<br />
By defining Use Cases in this manner, the system is defined as a set of requirements rather<br />
than a solution. You do not describe how the system must work. You describe what the system<br />
must be able to do. The Use Cases describe only those features visible and meaningful to<br />
the actors who use the system. Keeping this in mind will help you avoid functional decomposition,<br />
the breaking down of procedures and tasks into smaller and smaller processes until<br />
you have described all the internal workings of the system. One of the pitfalls of systems<br />
development is going over budget, which happens when you don’t limit the scope of each<br />
task or you make a model too inclusive. The <strong>UML</strong> provides seven diagrams, in addition to the<br />
Use Case Model, for fully describing the solution for the system, so remember that you can<br />
save some work for later.<br />
Tip<br />
One very common question about Use Cases is, “What requirements belong<br />
on the Use Case diagram and what requirements should be explained elsewhere”<br />
The simplest answer I’ve found is, “Model only the features of the<br />
system that can be seen by an actor.”<br />
For example, the system must save data to a database, but the actor can’t<br />
actually see this happening. The most they typically see is a message indicating<br />
that it did. In this situation, the Use Case level requirement is a<br />
message indicating success or failure on the save function, not the save<br />
function itself.<br />
Use Case relationships<br />
So far, I’ve defined the system, actors, and Use Cases, but now you need to associate each<br />
user with the system features they need to perform their jobs.