USE CASES Ch 6 in Textbook ( Applying UML & Patterns )
-
Upload
christen-alvarado -
Category
Documents
-
view
36 -
download
2
description
Transcript of USE CASES Ch 6 in Textbook ( Applying UML & Patterns )
![Page 1: USE CASES Ch 6 in Textbook ( Applying UML & Patterns )](https://reader036.fdocuments.in/reader036/viewer/2022081420/56812c07550346895d907685/html5/thumbnails/1.jpg)
USE CASES
Ch 6 in Textbook(Applying UML & Patterns)
![Page 2: USE CASES Ch 6 in Textbook ( Applying UML & Patterns )](https://reader036.fdocuments.in/reader036/viewer/2022081420/56812c07550346895d907685/html5/thumbnails/2.jpg)
2
Decision Point & BranchingBuy Items
A Use case may contain decision points such as in Buy Items, the customer may choose to pay via cash, credit or check.If one of them is the typical case (usual), then the typical case is the one written in Typical course of events, and the other alternatives should be written in the Alternatives section.If all the alternatives are equal in their likelihood, (like the payment types), write in the main section of Typical course of events a branch event, that indicates that the possible branches are written in subsections. Then write a subsection for each branch, again using Typical course of eventsIf subsections have alternatives, write them in an Alternatives section.
![Page 3: USE CASES Ch 6 in Textbook ( Applying UML & Patterns )](https://reader036.fdocuments.in/reader036/viewer/2022081420/56812c07550346895d907685/html5/thumbnails/3.jpg)
3
Example: Decision Point & BranchingBuy Items
Actor Action1. This use case begins when a
Customer arrives at POST checkout with items to purchase
2. ..3. Customer chooses payment type:
a. If cash payment, see section pay by Cash
b. If credit payment, see section pay by Credit
d. If check payment, see section pay by Check
6. The cashier gives the receipt to the customer
7. The customer leaves with the items
System Response
4. Logs the completed sale
5. Prints a receipt
Section: Main
![Page 4: USE CASES Ch 6 in Textbook ( Applying UML & Patterns )](https://reader036.fdocuments.in/reader036/viewer/2022081420/56812c07550346895d907685/html5/thumbnails/4.jpg)
4
Section: Pay by Cash
Actor Action1. The customer gives a
cash payment- possible greater than the sale total
2. The Cashier records the cash tendered
4. The Cashier deposits the cash received and extracts the balance owingThe Cashier gives the balance owing to the Customer
System Response
3. Shows the balance due back to the Customer
Alternative Courses:Line 4: Insufficient cash in drawer to pay balance. Ask for cash from supervisor, or ask Customer for a payment closer to sale total
![Page 5: USE CASES Ch 6 in Textbook ( Applying UML & Patterns )](https://reader036.fdocuments.in/reader036/viewer/2022081420/56812c07550346895d907685/html5/thumbnails/5.jpg)
5
POST
Start Up
Refund Purchased Items
Log In
Buy Items
System administrator
Manage Users
Etc.
Manager
Customer
Cashier
<<actor>>
CAS
![Page 6: USE CASES Ch 6 in Textbook ( Applying UML & Patterns )](https://reader036.fdocuments.in/reader036/viewer/2022081420/56812c07550346895d907685/html5/thumbnails/6.jpg)
6
![Page 7: USE CASES Ch 6 in Textbook ( Applying UML & Patterns )](https://reader036.fdocuments.in/reader036/viewer/2022081420/56812c07550346895d907685/html5/thumbnails/7.jpg)
7
![Page 8: USE CASES Ch 6 in Textbook ( Applying UML & Patterns )](https://reader036.fdocuments.in/reader036/viewer/2022081420/56812c07550346895d907685/html5/thumbnails/8.jpg)
8
Alternatives?
![Page 9: USE CASES Ch 6 in Textbook ( Applying UML & Patterns )](https://reader036.fdocuments.in/reader036/viewer/2022081420/56812c07550346895d907685/html5/thumbnails/9.jpg)
9
The <<extends>> Relationship
<<extends>> relationships represent exceptional or seldom invoked cases.A reusable use case (component) that conditionally interrupts (is invoked optionally -- like a menu selection in an application) the execution of another use case to augment its functionality.
The functionality in the original problem statement needs to be extended.The exceptional event flows are factored out of the main event flow for clarity.The base use case can be executed without the use case extension in extend associations. The responsibility for deciding when the extending use case should be used lies with the extending use case. Arrow points to use case being extended.
Extendeduse case
Extending use case
![Page 10: USE CASES Ch 6 in Textbook ( Applying UML & Patterns )](https://reader036.fdocuments.in/reader036/viewer/2022081420/56812c07550346895d907685/html5/thumbnails/10.jpg)
10
The <<extends>> Relationship
Use cases representing exceptional flows can extend more than one use case.The direction of an <<extends>> relationship is to the extended use caseFor example: the use case “ReportEmergency” is complete by itself , but can be extended by the use case “Help” for a specific scenario in which the user requires help
ReportEmergency
FieldOfficerfHelp
<<extend>>
![Page 11: USE CASES Ch 6 in Textbook ( Applying UML & Patterns )](https://reader036.fdocuments.in/reader036/viewer/2022081420/56812c07550346895d907685/html5/thumbnails/11.jpg)
When to Use <<extends>> Relationship
Major variation: If you have a major alternative path in the use case, and it’s complex enough to have its own alternative paths, then placing it on your diagram will honestly expose the complexity—which is helpful in costing, assignment, and scheduling.
Optional subgoal: If you have parts of the use case that would be optional to implement (or even optional to execute) to meet the actor’s goals, put those parts into their own use case. Doing so clarifies the relationships between actors and their goals. It also emphasizes that you may deliver these optional goals in later releases.
11http://dotnet.org.za/hannes/archive/2006/01/31/use-cases-when-to-use-includes-generalization-and-extending.aspx
![Page 12: USE CASES Ch 6 in Textbook ( Applying UML & Patterns )](https://reader036.fdocuments.in/reader036/viewer/2022081420/56812c07550346895d907685/html5/thumbnails/12.jpg)
12
Passenger
PurchaseTicket
TimeOut
<<extends>>
NoChange
<<extends>>OutOfOrder
<<extends>>
Cancel
<<extends>>
![Page 13: USE CASES Ch 6 in Textbook ( Applying UML & Patterns )](https://reader036.fdocuments.in/reader036/viewer/2022081420/56812c07550346895d907685/html5/thumbnails/13.jpg)
13
The <<extends>> Relationship
ManageIncident
CreateIncidentHandleIncident CloseIncident
<<Extend>>
<<Extend>><<Extend>>
![Page 14: USE CASES Ch 6 in Textbook ( Applying UML & Patterns )](https://reader036.fdocuments.in/reader036/viewer/2022081420/56812c07550346895d907685/html5/thumbnails/14.jpg)
The <<extends>> Relationship
14
![Page 15: USE CASES Ch 6 in Textbook ( Applying UML & Patterns )](https://reader036.fdocuments.in/reader036/viewer/2022081420/56812c07550346895d907685/html5/thumbnails/15.jpg)
The <<extends>> Relationship
15
![Page 16: USE CASES Ch 6 in Textbook ( Applying UML & Patterns )](https://reader036.fdocuments.in/reader036/viewer/2022081420/56812c07550346895d907685/html5/thumbnails/16.jpg)
16
Bank System
![Page 17: USE CASES Ch 6 in Textbook ( Applying UML & Patterns )](https://reader036.fdocuments.in/reader036/viewer/2022081420/56812c07550346895d907685/html5/thumbnails/17.jpg)
17
![Page 18: USE CASES Ch 6 in Textbook ( Applying UML & Patterns )](https://reader036.fdocuments.in/reader036/viewer/2022081420/56812c07550346895d907685/html5/thumbnails/18.jpg)
18
The <<includes>> Relationship
<<includes>> relationship represents behavior that is factored out of the use case. A use case uses another use case (“functional decomposition”)
Used to indicate that one use case includes the functionality of another use case.
A function in the original problem statement is too complex to be solvable immediately
Describe the function as the aggregation of a set of simpler functions. The associated use case is decomposed into smaller use cases
A reusable use case (component) that is unconditionally called into the execution of another use case (always included in the process – like running BIOS in a system boot).
Included use case
Including use case
![Page 19: USE CASES Ch 6 in Textbook ( Applying UML & Patterns )](https://reader036.fdocuments.in/reader036/viewer/2022081420/56812c07550346895d907685/html5/thumbnails/19.jpg)
19
Passenger
PurchaseSingleTicket
PurchaseMultiTicket
NoChange
<<extends>>
Cancel
<<extends>>
<<includes>>
CollectMoney
<<includes>>
Responsibility for the decision about when to use it lies with the calling use case. Arrow points to the included use case. The direction of a <<includes>> relationship is to the using use case (unlike <<extends>> relationships).
![Page 20: USE CASES Ch 6 in Textbook ( Applying UML & Patterns )](https://reader036.fdocuments.in/reader036/viewer/2022081420/56812c07550346895d907685/html5/thumbnails/20.jpg)
The <<includes>> Relationship
20
![Page 21: USE CASES Ch 6 in Textbook ( Applying UML & Patterns )](https://reader036.fdocuments.in/reader036/viewer/2022081420/56812c07550346895d907685/html5/thumbnails/21.jpg)
21
![Page 22: USE CASES Ch 6 in Textbook ( Applying UML & Patterns )](https://reader036.fdocuments.in/reader036/viewer/2022081420/56812c07550346895d907685/html5/thumbnails/22.jpg)
22
![Page 23: USE CASES Ch 6 in Textbook ( Applying UML & Patterns )](https://reader036.fdocuments.in/reader036/viewer/2022081420/56812c07550346895d907685/html5/thumbnails/23.jpg)
23
![Page 24: USE CASES Ch 6 in Textbook ( Applying UML & Patterns )](https://reader036.fdocuments.in/reader036/viewer/2022081420/56812c07550346895d907685/html5/thumbnails/24.jpg)
Actor Generalization
24
![Page 25: USE CASES Ch 6 in Textbook ( Applying UML & Patterns )](https://reader036.fdocuments.in/reader036/viewer/2022081420/56812c07550346895d907685/html5/thumbnails/25.jpg)
25
University Registration System