Extending the Requirements Model - techniques for detailing use cases Use Case Descriptions -...

15
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

Transcript of Extending the Requirements Model - techniques for detailing use cases Use Case Descriptions -...

Page 1: Extending the Requirements Model - techniques for detailing use cases Use Case Descriptions - Chapter 5 pp: 119-124 Activity Diagrams - Chapter 5 pp: 125-126;

1

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

Page 2: Extending the Requirements Model - techniques for detailing use cases Use Case Descriptions - Chapter 5 pp: 119-124 Activity Diagrams - Chapter 5 pp: 125-126;

2

Where are we?

Analysis Chapters

Ch 2 Investigating System Requirements

Ch 3 Use Cases

Ch 4 Domain Modeling

Ch 5 Extending the Requirements Model

Page 3: Extending the Requirements Model - techniques for detailing use cases Use Case Descriptions - Chapter 5 pp: 119-124 Activity Diagrams - Chapter 5 pp: 125-126;

3

Outline

Describing Use Cases in more detailUse Case Descriptions (Ch 5)Activity Diagrams (Ch5 & Ch2)

Page 4: Extending the Requirements Model - techniques for detailing use cases Use Case Descriptions - Chapter 5 pp: 119-124 Activity Diagrams - Chapter 5 pp: 125-126;

4

Use Case Description

Describes the details for a given use caseVarious levels of details

−Brief (Ch 3)− Intermediate−Fully developed

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.

Use Case Description (brief version)

Withdrawcash

ATM System

Page 5: Extending the Requirements Model - techniques for detailing use cases Use Case Descriptions - Chapter 5 pp: 119-124 Activity Diagrams - Chapter 5 pp: 125-126;

5

Use Case Description – “Brief”

Customer

CreateCustomeraccount

Use Case Description“Brief”

Page 6: Extending the Requirements Model - techniques for detailing use cases Use Case Descriptions - Chapter 5 pp: 119-124 Activity Diagrams - Chapter 5 pp: 125-126;

6

Use Case Description – “Fully Developed”

Customer

CreateCustomeraccount

Page 7: Extending the Requirements Model - techniques for detailing use cases Use Case Descriptions - Chapter 5 pp: 119-124 Activity Diagrams - Chapter 5 pp: 125-126;

7

Use Case Description – “Fully Developed”

Use case name – e.g. Create Customer Account

Scenario – 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 – includes or extends

Stakeholders – vested interest

Preconditions – 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

Page 8: Extending the Requirements Model - techniques for detailing use cases Use Case Descriptions - Chapter 5 pp: 119-124 Activity Diagrams - Chapter 5 pp: 125-126;

8

UML's Activity Diagram

Page 9: Extending the Requirements Model - techniques for detailing use cases Use Case Descriptions - Chapter 5 pp: 119-124 Activity Diagrams - Chapter 5 pp: 125-126;

9

UML Activity Diagram

a graphical representation of procedural flowActivitiesPeople, 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)

Page 10: Extending the Requirements Model - techniques for detailing use cases Use Case Descriptions - Chapter 5 pp: 119-124 Activity Diagrams - Chapter 5 pp: 125-126;

10

Activity Diagram – Symbols

contains activities performed by a single agent (actor, organizational unit)

Swimlane

StartingActivity

EndingActivity

Transition/Activity Edge

DecisionActivity/Action

Split/Fork Join

Synchronization Bar Used for concurrency

Loop

For each item in …

Output cannot execute until all inflows have been

received

End for each item

[guard]

[guard]

Merge

Page 11: Extending the Requirements Model - techniques for detailing use cases Use Case Descriptions - Chapter 5 pp: 119-124 Activity Diagrams - Chapter 5 pp: 125-126;

11

Activity Diagram – Issue a Quote

[guard]

[guard]

Use this notation for decisions- i.e. include the [guards]

Page 12: Extending the Requirements Model - techniques for detailing use cases Use Case Descriptions - Chapter 5 pp: 119-124 Activity Diagrams - Chapter 5 pp: 125-126;

12

Forks, Joins, and Decisions

Bad

Good

waiting for 4 activities to finish

Merge!

Page 13: Extending the Requirements Model - techniques for detailing use cases Use Case Descriptions - Chapter 5 pp: 119-124 Activity Diagrams - Chapter 5 pp: 125-126;

13

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.

Page 14: Extending the Requirements Model - techniques for detailing use cases Use Case Descriptions - Chapter 5 pp: 119-124 Activity Diagrams - Chapter 5 pp: 125-126;

14

Practice: Activity Diagram

Page 15: Extending the Requirements Model - techniques for detailing use cases Use Case Descriptions - Chapter 5 pp: 119-124 Activity Diagrams - Chapter 5 pp: 125-126;

15

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

2. Clerk scans items

3. Clerk indicates end of the sale

4. If contractor wants receipt, clerk requests receipt

1.1 System validates account

2.1 System creates a Sale2.2 System looks up item2.3 System adds item to Sale

3.1 System calculates total amount3.2 System reduces credit limit

4.1 System prints receipt

Exception conditions

1.1 If account is out of balance, initiate "Create a New Cash Sale" use cases2.2 If item is not found, clerk call manager and manually enter item information3.1 If amount is greater than credit limit, initiate "Create a New Cash Sale" use case

Practice: Use Case Description