Use Case Description – “Fully Developed”

Report
Extending the Requirements Model
- techniques for detailing use cases
Use Case Descriptions - Chapter 5 pp: 119-124
Activity Diagrams - Chapter 5 pp: 125-126; and Chapter 2 pp 57-60
1
Where are we?
Analysis Chapters
Ch 2 Investigating System Requirements
Ch 3 Use Cases
Ch 4 Domain Modeling
Ch 5 Extending the Requirements Model
2
Outline
Describing Use Cases in more detail
 Use Case Descriptions (Ch 5)
 Activity Diagrams (Ch5 & Ch2)
3
Use Case Description
Describes the details for a given use case
 Various levels of details
− Brief (Ch 3)
− Intermediate
− Fully developed
ATM System
Withdraw
cash
Use Case Description (brief version)
Actor inserts a bank card and PIN, and the system sends the
account number and PIN number to the bank for verification.
Actor enters a withdrawal amount, and the system requests the
bank’s authorization, creates a transaction record, and
dispensing cash.
4
Use Case Description – “Brief”
Create
Customer
account
Customer
Use Case Description
“Brief”
5
Use Case Description – “Fully Developed”
Create
Customer
account
Customer
6
Use Case Description – “Fully Developed”
Use case name
Scenario
– e.g. Create Customer Account
– unique path through this use case (Create Online Customer Account)
Triggering event
– external, temporal, state
Brief description
– summary of Flow of Activities
Actors
– actual user(s)
Related use cases
Stakeholders
Preconditions
– includes or extends
– vested interest
– any object/system that must be available before the use case
Post conditions – objects/associations created/updated during the use case
Flow of activities – actor and system swimlanes showing interactions
Exception conditions – what prevents the use case from completing
7
UML's
Activity Diagram
8
UML Activity Diagram
a graphical representation of procedural flow
 Activities
 People, System(s)
 Flow
 Used to model 2 things
− Entire Business Processes or Workflows (Ch 2)
• Can be use for Business Process Modeling (BPM)
− A Single Use Case (Ch 5)
9
Activity Diagram – Symbols
Synchronization Bar
Swimlane
Used for concurrency
Join
Split/Fork
contains activities performed by a single
agent (actor, organizational unit)
Output cannot execute
until all inflows have been
received
Starting
Activity
Ending
Activity
Loop
For each item in …
Decision
Activity/Action
Transition/Activity Edge
End for each item
Merge
[guard]
[guard]
10
Activity Diagram – Issue a Quote
Use this notation for decisions
- i.e. include the [guards]
[guard]
[guard]
11
Forks, Joins, and Decisions
Bad
waiting for 4
activities to finish
Good
Merge!
12
Practice: Activity Diagram & Use Case Description
 Use Case Scenario for “Creating a New Sale for a Contractor (on
credit)”.
Quality Building Supply has two kinds of customers: contractors and the
general public. Sales to each are slightly different.
A contractor buys materials by taking them to the checkout desk for
contractors. The clerk enters the contractor's name into the system. The
system displays the contractor's information, including his/her current credit
standing. The clerk then opens up a new ticket (sale) for the contractor.
Next, the clerk scans in each item to be purchased. The system finds the
price of the item and adds the item to the ticket. At the end of the purchase,
the clerk indicates the end of the sale. The system compares the total
amount against the contractor’s current credit limit, and if it is acceptable,
finalizes the sale. The system creates an electronic ticket for the items, and
the contractor’s credit limit is reduced by the amount of the sale.
13
Practice: Activity Diagram
14
Practice: Use Case Description
Use case name
Create a New Sale
Scenario
Creating a new sale for contractors (on credit)
Triggering event
Contractor wants to purchase items
Brief description
Contractor bring items to checkout desk. Clerk validates his account and credit limit. Clerk scan
items. System looks up price, records items, and compares total to credit limit. The system creates a
ticket with all items and reduces the credit limit. A ticket is printed upon request.
Actors
Clerk
Related use cases
None: includes or extends
Stakeholders
Sales clerk, Sale department, Accounting department
Preconditions
Account must exist; Inventory items must exist
Post conditions
Sale is created, Sale line items are created and connected to the sale.
Account is updated, Inventory is reduced
Flow of activities
Actor
System
1. Clerk enters customer name
1.1 System validates account
2. Clerk scans items
2.1 System creates a Sale
2.2 System looks up item
2.3 System adds item to Sale
3. Clerk indicates end of the sale
3.1 System calculates total amount
3.2 System reduces credit limit
4. If contractor wants receipt, clerk requests receipt
4.1 System prints receipt
Exception
conditions
1.1 If account is out of balance, initiate "Create a New Cash Sale" use cases
2.2 If item is not found, clerk call manager and manually enter item information
3.1 If amount is greater than credit limit, initiate "Create a New Cash Sale" use case
15

similar documents