+ All Categories
Home > Documents > USE CASE MODELLING A use case is a scenario that describes the use of a system by an actor to...

USE CASE MODELLING A use case is a scenario that describes the use of a system by an actor to...

Date post: 31-Mar-2015
Category:
Upload: keagan-blessing
View: 215 times
Download: 2 times
Share this document with a friend
Popular Tags:
33
USE CASE MODELLING A use case is a scenario that describes the use of a system by an actor to accomplish a specific goal. An actor is a user playing a role with respect to the system. - people, other systems. • Scenario A sequence of steps that describe the interactions between an actor and the system. The use case model consists of the collection of all actors and all use cases.
Transcript
Page 1: USE CASE MODELLING A use case is a scenario that describes the use of a system by an actor to accomplish a specific goal. An actor is a user playing a.

USE CASE MODELLING

• A use case is a scenario that describes the use of a system by an actor to accomplish a specific goal.

• An actor is a user playing a role with respect to the system.

- people, other systems.• Scenario

A sequence of steps that describe the interactions between an actor and the system.

• The use case model consists of the collection of all actors and all use cases.

Page 2: USE CASE MODELLING A use case is a scenario that describes the use of a system by an actor to accomplish a specific goal. An actor is a user playing a.

Use cases help ..

· Capture the system's functional requirements from the users' perspective

· Actively involve users in the requirements-gathering process

· Provide the basis for identifying major classes and their relationships

· Serve as the foundation for developing system test cases

Page 3: USE CASE MODELLING A use case is a scenario that describes the use of a system by an actor to accomplish a specific goal. An actor is a user playing a.

USE CASE MODELLING-functional reqts., analysis phase- what a system does: functions represented as use cases- Actor: external agent that interacts with the system, exchanges info. with

the system (user, sub-system, etc.) - a role played by user

Note: a use case represents a complete functionality. – view of system behavior from an external person’s viewpoint– effective tool for validating requirements– an effective communication tool– basis for a test plan– basis for user manual

Developing the use cases in not difficult; ensuring that you have them all is murder.

Page 4: USE CASE MODELLING A use case is a scenario that describes the use of a system by an actor to accomplish a specific goal. An actor is a user playing a.

• Use Case Diagrams

– Actor– Line: actor communicates with or is associated

with use-case

Customer Loses a Tape

Page 5: USE CASE MODELLING A use case is a scenario that describes the use of a system by an actor to accomplish a specific goal. An actor is a user playing a.

• Use Case relationships:– <<uses>>: one use case always involves the

steps of another– <<extends>>: under certain conditions, a use case

follows a variant

Customer

Loses a Tape

Buy a Tape

<<uses>>

Customer

VIP Loses a Tape

<<extends>>

Page 6: USE CASE MODELLING A use case is a scenario that describes the use of a system by an actor to accomplish a specific goal. An actor is a user playing a.

Goals of use cases• Interactions that provide value to actors• No implementation specific language

– No assumptions about how the use case may be realized in code or user-interface

– Note: use-cases drive the whole life-cycle, and they get refined – implementation specific use-cases

• User-appropriate level of detail– General at requirements gathering stage

• User-appropriate volume– Large systems: no more than 70-80 use cases– Small number of use cases – forces abstraction

Page 7: USE CASE MODELLING A use case is a scenario that describes the use of a system by an actor to accomplish a specific goal. An actor is a user playing a.

Use case scenarios• a realization of a use case.• Instance of an use case that effectively tests one path through a use

case• To demonstrate whether a use case accurately reflects user needs• useful during testingExample:Use case name: Determine benefits eligibility for enrolleeSteps:

1. This use case starts when the social worker enters the enrollee’s name and employment situation.2. This use case ends when the system responds with a determination of whether the enrollee is eligible for benefits and the financial extent of benefits.

Alternative path:In step 1, if the enrollee has applied for benefits previously, based on the enrollee’s own disclosure, the social worker enters the enrollee’s name to search for his or her previous records

Page 8: USE CASE MODELLING A use case is a scenario that describes the use of a system by an actor to accomplish a specific goal. An actor is a user playing a.

Use case scenario - example

Example of scenario

1. The social worker asks Edward Trueman if he has applied previously for and/or received benefits. And Mr. Trueman replies that he has applied previously.

2. The social worker provides Mr. Trueman’s name as search criterion

3. The system provides Mr. Trueman’s previous records, which state that he applied for benefits on Dec 9th, 1997, and was determined to be ineligible on Dec 9th 1997 because of his current part-time employment status at Boeing Aerospace in the capacity of assembly line worker.

Page 9: USE CASE MODELLING A use case is a scenario that describes the use of a system by an actor to accomplish a specific goal. An actor is a user playing a.

Registration forspecial class

Class registration

Prereq coursesnot completed

Student Billing

Student

Bursar’soffice

RegistrationClerk

Instructor

<<Extends>> <<Extends>>

Use-Case Diagram

Extends: extension to or variation of a use-case that exists in its own right

Page 10: USE CASE MODELLING A use case is a scenario that describes the use of a system by an actor to accomplish a specific goal. An actor is a user playing a.

Order Food

Hire Employee

Reordersupplies

Producemgt. reports

Track salesand inv. data

<<uses>>

<<uses>>

Customer

Applicant

Supplier

Service Person

Manager

Uses: factors common behavior amongst multiple use-cases into a generalized use-case.

Page 11: USE CASE MODELLING A use case is a scenario that describes the use of a system by an actor to accomplish a specific goal. An actor is a user playing a.

Step 1: Identifying Actors and Use Cases– From context diagram, workflow diagram

Step2: Construct Use Case Model– System scope and boundary in terms of use cases and actors– partitioned into sub-systems

Step 3:Use Case sequence of actions

Step4: Identifying use case dependencies

Step5: Use case alternate course of actions

Step6: Finding Potential Objects– Nouns in use case

Step7: Selecting proposed Objects

• Class Diagram (Object Association Model, Object Relationship Model)

Page 12: USE CASE MODELLING A use case is a scenario that describes the use of a system by an actor to accomplish a specific goal. An actor is a user playing a.

• Finding the actors- Ask client and domain experts how system will

be used- Who will perform the obvious tasks?

Secondary tasks of maintenance and administration? Interact with other systems?

- Clear and differentiated names (eg. manager vs supervisor)

Page 13: USE CASE MODELLING A use case is a scenario that describes the use of a system by an actor to accomplish a specific goal. An actor is a user playing a.

• Recording the use cases- For each actor, what interactions /”results” they

require of the system –each is a use case• Not overly precise yet, just note them down

– What tasks does the actor want the system to perform– What information must the actor provide to the system– Are there events that the actor must tell system about– Does actor need to be informed when something

happens– Does actor help initialize or shut down the system

Page 14: USE CASE MODELLING A use case is a scenario that describes the use of a system by an actor to accomplish a specific goal. An actor is a user playing a.

Example: video store system Actor: Customer

- What tasks does the actor want the system to perform?- Find movie to rent, rent tape, return tape, reserve tape

- What information must the actor provide to the system?

- Name, address, membership#, film name

- Are there events that the actor must tell system about?- Change of address

- Does actor need to be informed when something happens?

- Reserved tape is ready to be rented

- Does actor help initialize or shut down the system- no

Page 15: USE CASE MODELLING A use case is a scenario that describes the use of a system by an actor to accomplish a specific goal. An actor is a user playing a.

Example: video store system

Resulting use cases:• Customer joins and provides contact information

including name, address, phone#, credit information, spouse and kids

• Customer browses system looking for a tape to rent

• Customer comes to store looking for a specific tape to rent

• Customer rents a tape

• Customer returns a tape

• Customer reserves a tape

• Customer is contacted when a reserved tape is ready

Note: simple phrases, without much details initially.

Page 16: USE CASE MODELLING A use case is a scenario that describes the use of a system by an actor to accomplish a specific goal. An actor is a user playing a.

• Finding the actors- Ask client and domain experts how system will

be used- Who will perform the obvious tasks?

Secondary tasks of maintenance and administration? Interact with other systems?

- Clear and differentiated names (eg. manager vs supervisor)

Page 17: USE CASE MODELLING A use case is a scenario that describes the use of a system by an actor to accomplish a specific goal. An actor is a user playing a.

• Recording the use cases- For each actor, what interactions /”results” they

require of the system –each is a use case• Not overly precise yet, just note them down

– What tasks does the actor want the system to perform– What information must the actor provide to the system– Are there events that the actor must tell system about– Does actor need to be informed when something

happens– Does actor help initialize or shut down the system

Page 18: USE CASE MODELLING A use case is a scenario that describes the use of a system by an actor to accomplish a specific goal. An actor is a user playing a.

Example: video store system Actor: Customer

- What tasks does the actor want the system to perform?- Find movie to rent, rent tape, return tape, reserve tape

- What information must the actor provide to the system?

- Name, address, membership#, film name

- Are there events that the actor must tell system about?- Change of address

- Does actor need to be informed when something happens?

- Reserved tape is ready to be rented

- Does actor help initialize or shut down the system- no

Page 19: USE CASE MODELLING A use case is a scenario that describes the use of a system by an actor to accomplish a specific goal. An actor is a user playing a.

Example: video store system

Resulting use cases:• Customer joins and provides contact information

including name, address, phone#, credit information, spouse and kids

• Customer browses system looking for a tape to rent

• Customer comes to store looking for a specific tape to rent

• Customer rents a tape

• Customer returns a tape

• Customer reserves a tape

• Customer is contacted when a reserved tape is ready

Note: simple phrases, without much details initially.

Page 20: USE CASE MODELLING A use case is a scenario that describes the use of a system by an actor to accomplish a specific goal. An actor is a user playing a.

Example: video store system

– Other actors:• Clerk adds a new film to the system• It is time to order more films – manager wants to know

which films are popular so as to get extra copies• Store orders 10 new copies of film; when they arrive,

clerk adds them to system and puts them on shelf• Manager wants to know if he is making money

• thinking of these may lead to some more customer use cases:

- Customer wants to know new movies in the store.

Page 21: USE CASE MODELLING A use case is a scenario that describes the use of a system by an actor to accomplish a specific goal. An actor is a user playing a.

Example: video store system• Use cases from attributes of “things”

– tapes have actors, film name, director, release date– Customer wants to find every movie starring a

specific actor– Customer wants to find movies with same director as

the last film she rented– Manager wants to put together list of movies rated

‘G’.

• Use cases to manage the attributes:– Clerk adds new film to system– Clerk removes obsolete film from system– Clerk updates information about a film

Page 22: USE CASE MODELLING A use case is a scenario that describes the use of a system by an actor to accomplish a specific goal. An actor is a user playing a.

Example: video store system

• These use cases can remind us of similar responsibilities for customers:– Clerk adds customer to the system– Clerk removes customer account from system– Clerk updates customer’s account

Page 23: USE CASE MODELLING A use case is a scenario that describes the use of a system by an actor to accomplish a specific goal. An actor is a user playing a.

• Use case name, description

Example: Customer Loses a Tape The customer reports to the clerk that he has lost a

tape. The clerk prints out the rental record and asks customer to speak with the manager, who will arrange for the customer to pay a fee. The system will be updated to reflect lost tape, and customer’s record is updated as well. The manager may authorize purchase of a replacement tape.

Page 24: USE CASE MODELLING A use case is a scenario that describes the use of a system by an actor to accomplish a specific goal. An actor is a user playing a.

• Scenarios: a use case scenario shows the flow of events in a particular instance of a use case.– focussed on the business problem, not the solution

- shows most common situation

- can have greater or less detail as required to understand flow of interactions and events

- also consider exceptional rather than the normal situations.

• Scenario guidelines– how does the scenario begin? what causes it to end?

- what is the distinction between what the actors do and how the system responds

- what feedback will the actor receive?

- which activities may repeat, and what causes them to stop?

– Is there conditional branching in the flow of the scenario?

Page 25: USE CASE MODELLING A use case is a scenario that describes the use of a system by an actor to accomplish a specific goal. An actor is a user playing a.

• Formal description of use cases:- Use case name- Actors, brief description- Actions taking place- scenario – flow of events- Some use cases have multiple scenarios to

explore various contingent activities- Preconditions –before the use case can begin

– Eg. for Lost a Tape use case, customer must be member and must have rented a tape.

- Post-conditions: state of system and perhaps for actors, after the use case is completed

Page 26: USE CASE MODELLING A use case is a scenario that describes the use of a system by an actor to accomplish a specific goal. An actor is a user playing a.

Member Services

Department

Past Member

Club Member

Request Membership rpts

Submit subscription

renewal

Create new subscription

program

Submit New Subscription

Send subscription renewal offer

Send new subscription offer

Potential Member

Member Services System

Submit Regular Order

Request Sales Reports

Submit Promotion Order

Marketing Department

Create New Seasonal Promotion

Create New Monthly

Promotion

Request Promotion Reports

Send Club Promotion

Membership System

Orders SubSystem

Promotions SubSystem

Page 27: USE CASE MODELLING A use case is a scenario that describes the use of a system by an actor to accomplish a specific goal. An actor is a user playing a.

Send subscription renewal offer

subscription renewal

Create new subscription program

Send new subscription

offer

Submit New Subscription

depends on

depends on

depends on

depends on

Submit Promotion Order

Send Club Promotion

Create New Seasonal Promotion

Create New Monthly

Promotion

depends on

OR

depends on

depends on

Request Membership rpts

Request Promotion Reports

Request Sales Reports

Submit Regular Order

Member Services System Use Case Dependency Diagram

Page 28: USE CASE MODELLING A use case is a scenario that describes the use of a system by an actor to accomplish a specific goal. An actor is a user playing a.

ACTORS USE CASE

Club Member Initiates Submit Promotion OrderSubmit Regular Order

Potential Member Initiates Submit New Subscription

Past Member Initiates Submit Subscription Renewal

Membership Services Dept. Initiates Request Membership Reports

Marketing Department Initiates Create New Monthly PromotionCreate New Seasonal PromotionCreate New Subscription ProgramRequest Promotion ReportsRequest Sales Reports

Membership Services System Initiates Send New Subscription OfferSend Club PromotionSend Subscription Renewal

Page 29: USE CASE MODELLING A use case is a scenario that describes the use of a system by an actor to accomplish a specific goal. An actor is a user playing a.

USE CASE NAME Submit Promotion OrderACTOR Club MemberDESCRI PTI ON Describes the process when a club member submits a club promotion

order to either indicate the products they are interested in ordering ordeclining to order during this promotion1. This use is initiated when the club member submits the promotion

order to be proceeded2. The club member's personal information such as address is validated

against what is currently recorded in member services3. The promotion order is verified to see if product is being ordered4. The club member's credit status is checked with Accounts Receivable

to make sure no payments are outstanding5. For each product being ordered, validate the product number6. For each product being ordered, check the availability in inventory

and record the ordered information which includes "quantity beingordered" and give each ordered product a status of "open"

7. Create a Picking Ticket for the promotion order containing all orderedproducts which have a status "open"

Normal Course

8. Route the picking ticket to the warehousePRECONDI TI ON Use case send club promotion has been processedPOST CONDI TI ON Promotion order has been recorded and the picking ticket has been

routed to the warehouseASSUMPTI ONS

Page 30: USE CASE MODELLING A use case is a scenario that describes the use of a system by an actor to accomplish a specific goal. An actor is a user playing a.

USE CASE NAME Submit Promotion OrderACTOR Club MemberDESCRIPTI ON Describes the process when a club member submits a club promotion order to either indicate

the products they are interested in ordering or declining to order during this promotion1. This use is initiated when the club member submits the promotion order to be proceeded2. The club member's personal information such as address is validated against what is

currently recorded in member services3. The promotion order is verified to see if product is being ordered4. The club member's credit status is checked with Accounts Receivable to make sure no

payments are outstanding5. For each product being ordered, validate the product number6. For each product being ordered, check the availability in inventory and record the ordered

information which includes "quantity being ordered" and give each ordered product a statusof "open"

7. Create a Picking Ticket for the promotion order containing all ordered products which have astatus "open"

8. Route the picking ticket to the warehouse

NORMAL COURSE

2. I f the club member has indicated an address or telephone number change on the promotionorder, update the club member's record with the new information

3. I f the club member is not ordering product at this time, modify the promotion order's statusto be "closed" and modify the selection of the month ordered product's record to have astatus of "rejected", then cancel the transaction

4. I f Account Receivable returns a credit status that the customer is in arrears, invoke abstractuse case Send Order Rejection Notice Modify the promotion's order's status to be "on holdpending payment"

5. a) I f the product number is not valid, create an Order Error Report containing the club

member's information, the promotion order information, and the product number inerror. Each completed report will be routed to a Member Services clerk forresolution.

b) I f the club member is not ordering the selection of the month, modify the orderedproduct's record to have a status of "rejected"

6. I f the product being ordered is not available, record the ordered product information whichincludes "quantity being ordered" and give a status of "backordered"

ALTERNATE COURSE

7. I f there are no ordered product records with a status "open", cancel the transactionPRECONDI TI ON Use case send club promotion has been processedPOST CONDITION Promotion order has been recorded and the picking ticket has been routed to the warehouseASSUMPTI ONS

Page 31: USE CASE MODELLING A use case is a scenario that describes the use of a system by an actor to accomplish a specific goal. An actor is a user playing a.

POTENTI AL OBJ ECT LI STClub MemberPotential MemberPast MemberMember Services DepartmentMarketing DepartmentMember Services SystemMember AddressPromotion OrderProductProduct InventoryOrder QuantityOrdered ProductCredit StatusPaymentsOrdered Product StatusPicking TicketWarehouseMember Telephone NumberSelection of MonthTransactionAccounts ReceivablePromotion Order StatusOrder Error ReportMember Services Clerk

Page 32: USE CASE MODELLING A use case is a scenario that describes the use of a system by an actor to accomplish a specific goal. An actor is a user playing a.

POTENTI AL OBJ ECT LI ST REASONClub Member Type of "MEMBER"Potential Member Type of "MEMBER"Past Member Type of "MEMBER"Member Services Department X Not relevant for current projectMarketing Department X Not relevant for current projectMember Services System X Not relevant for current projectMember Address X Attribute of "MEMBER"Promotion Order Result of an event named "PROMOTION"

Type of "MEMBER ORDER"Product "PRODUCT"Product Inventory X Attribute of "PRODUCT"Order Quantity X Attribute of " MEMBER ORDER"Ordered Product "PRODUCT ON ORDER"Credit Status X Attribute of "MEMBER"Payments X Out of ScopeOrdered Product Status X Attribute of "PRODUCT ON ORDER"Picking Ticket X Potential interface itemWarehouse X Not relevant for current projectMember Telephone Number X Attribute of "MEMBER"Selection of Month Type of "TITLE"Transaction X Not relevant for current projectAccounts Receivable X Not relevant for current projectPromotion Order Status X Attribute of "MEMBER ORDER"Order Error Report X Potential interface itemMember Services Clerk X Not relevant for current project

Page 33: USE CASE MODELLING A use case is a scenario that describes the use of a system by an actor to accomplish a specific goal. An actor is a user playing a.

New Membership Plan

& Sub. Offer

Sales and Promotion

Reports

New Monthly OR

Seasonal Promotion

Club promotion

Promotion order

regular order

Subscription renewaloffer

Subscription renewal

ClubMember

PastMember

PotentialMember

Order to be filled

Membership Reports

Warehouse

Member Services Dept. Marketing Dept.

A/C Receivable DB

Member credit status

Subscription Offer

New Subscription

Member ServicesContext Model


Recommended