SlideShare a Scribd company logo
1
TCSS 360, Spring 2005
Lecture Notes
Use Cases
Relevant Reading:
Writing Effective Use Cases
A. Cockburn
2
Use cases
 use cases: written descriptions of user's
interaction with the software product to
accomplish a goal
 (in a business system): "A sequence of transactions in a
system whose task is to yield a result of measurable
value to an individual actor of the business system"
 (in an information system): "A behaviorally related
sequence of transactions performed by an actor in a
dialogue with the system to provide some measurable
value to the actor" (Jacobson 1995)
 Use cases are the ways in which a system can be
used (the functions which the system provides to
its users)
 Use cases help us discover/document
requirements
3
Benefits of doing use cases
 The list of goal names provides executives:

Shortest summary of what system will contribute

Project planning skeleton (priorities & timing)
 The main success scenario provides all:

Agreement as to the system’s responsibilities
 The extension conditions provide programmers:

List of things programmers have to watch for

List of things analysts have to investigate
 The extension handling steps provide dev team:

Record of (tricky) business policy decisions
4
Cockburn's requirements list
Requirements Outline (p13-14) - good template of all functional
requirements
1. purpose and scope
2. terms / glossary
3. use cases
4. technology used
5. other
5a. development process - participants, values (fast-
good-cheap), visibility, competition, dependencies
5b. business rules / constraints
5c. performance demands
5d. security (now a hot topic), documentation
5e. usability
5f. portability
5g. unresolved / deferred
6. human issues: legal, political, organizational, training
5
Actors and stakeholders
 What is an actor? A primary actor?
 What is the difference between an actor and
a stakeholder?
 actor: anything with behavior that acts on the system
 primary actor: initiates interaction to achieve goal
(when system is a software product, primary actor is
often the computer user)

supporting actor: performs sub-goals to help use case

stakeholder: anyone interested in the system
 examples: supplier, stock agency, vendor

the difference: stakeholder might not "act" in any
scenario
6
Use case goals and levels
 goal: action that actor wants to accomplish
 level: type / scope of a goal
 summary goals ("above sea level"): multi-
sitting

user goals ("sea-level"): one
sitting

subfunctions ("below sea level"): partial
user goal
summary goal
subfunction
Why?
How?
What?
7
Goals and levels, examples
 Withdraw money from an ATM
 level?
 Purchase a book from the online store, and have it
shipped to the user; can be cancelled while in
transit
 level?
 Purchase shares of stock online using a "stock
trap."
 level?
 Update user's balance after a deposit.
user goal
summary goal
summary goal
subfunction
8
Qualities of a good use case
 a good use case:
 starts with a request from an actor to the system
 ends with the production of all the answers to
the request
 defines the interactions (between system and
actors) related to the function
 takes into account the actor's point of view, not
the system's
 focuses on interaction, not internal system
activities
 doesn't describe the GUI in detail
 has 3-9 steps in the main success scenario

9
Use cases vs. internal
features
 consider software to run a cell phone:
Use Cases
 call someone
 receive a call
 send a message
 memorize a
number
Point of view: user
Internal Functions
 transmit / receive data
 energy (battery)
 user I/O (display, keys, ...)
 phone-book mgmt.
Point of view: developer /
designer
10
Do use cases capture these?
 Which of these requirements should be
represented directly in a use case?

Order cost = order item costs * 1.06 tax.

Promotions may not run longer than 6 months.

Customers only become Preferred after 1 year.
 A customer has one and only one sales contact.

Response time is less than 2 seconds.

Uptime requirement is 99.8%.

Number of simultaneous users will be 200 max.
Answer: NONE. Most of these requirements are non-
functional, so the use cases wouldn't explicitly mention
them. The user doesn't see them directly in the success
11
Styles of use cases
1. actor / goal list or UML use case diagram
 shows all use cases in system
2. informal use case
3. formal use case
Let's examine each of these in detail...
12
1. Actor / goal list
 it can be useful to create a list or table of
actors and their "goals" (use cases they
start):
ACTORS USE CASE
Club Member Initiates Submit Promotion Order
Submit Regular Order
Potential Member Initiates Submit New Subscription
Past Member Initiates Submit Subscription Renewal
Membership Services Dept. Initiates Request Membership
Marketing Department Initiates Create New Monthly Promotion
Create New Seasonal Promotion
Create New Subscription Program
Request Promotion Reports
Request Sales Reports
Membership Services System Initiates Send New Subscription Offer
Send Club Promotion
Send Subscription Renewal
13
UML use case diagrams
 use cases can be drawn as diagrams, with:
 actors as stick-men, with their names below
 use cases as ellipses with their names below or
inside
 association indicated by lines, connecting an
actor to a use case in which that actor
participates
 use cases can be connected to other cases that
they use / rely on
customer
open account
14
Example use case diagram
15
Example use case diagram 2
Control System
Set limits
Calibrate
Take profile
Scan
Liason Physicist
Hardware Specialist
Experimental
Physicist
16
Example use case diagram 3
Order Food
Hire Employee
Reorder
supplies
Produce
mgt. reports
Track sales
and inv. data
<<uses>>
<<uses>>
Customer
Applicant
Supplier
Service Person
Manager
17
2. Informal use case
 informal use case: written as a paragraph
describing the scenario
 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.
18
Formal use case example
19
Formal use case elements
"Place an order" (User goal / Clerk)
Main scenario:
1. Clerk identifies customer, item and quantity.
2. System accepts and queues the order.
Extensions:
1a. Low credit & Customer is 'Preferred':
1a1. System gives them credit anyway.
1b. Low credit & not 'Preferred' customer:
1b1. Clerk performs Sign Up Preferred Customer
scenario and accepts only prepayment.
2a. Low on stock: Customer accepts rain-check:
2a1. Clerk reduces order to available stock level.
(goal of primary actor)
(level of goal [summary, user, subfunction])
(action steps:
full sentences showing
who takes the action!
3 - 9 steps long.)
(condition causing different actions)
(action step(s)
handling those conditions)
(primary actor)
(calling another use case)
20
Example use case
Use Case 12. Buy stocks over the web
Primary Actor: Purchaser (user) Scope: PAF
Level: user goal Precondition: User already has PAF open.
Guarantees: sufficient log information exists that PAF can detect what went wrong.
Success Guarantees: remote web site acknowledged purchase, user's portfolio
updated.
Main success scenario:
1. User selects to buy stocks over the web.
2. PAF gets name of web site to use (E*Trade, Schwabb, etc.)
3. PAF opens web connection to the site, retaining control.
4. User browses and buys stock from the web site.
5. PAF intercepts responses from the web site, and updates the user's portfolio.
6. PAF shows the user the new portfolio standing.
Extensions:
2a. User wants a web site PAF does not support:
2a1. System gets new suggestion from user, with option to cancel use case.
3a. ...
21
Use case tables
 formal use cases can also be written as a
table:
USE CASE NAME Submit Promotion Order
ACTOR Club Member
DESCRIPTION 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 promotion
1. This use is initiated when the club member submits the promotion
order to be proceeded
2. The club member's personal information such as address is validated
against what is currently recorded in member services
3. The promotion order is verified to see if product is being ordered
4. The club member's credit status is checked with Accounts Receivable
to make sure no payments are outstanding
5. For each product being ordered, validate the product number
6. 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 status of "open"
7. Create a Picking Ticket for the promotion order containing all ordered
products which have a status "open"
Normal Course
8. Route the picking ticket to the warehouse
PRECONDITION Use case send club promotion has been processed
POST CONDITION Promotion order has been recorded and the picking ticket has been
routed to the warehouse
ASSUMPTIONS
22
One method to do use cases
Now that we know the syntax for doing use cases,
what 4 steps does Cockburn recommend when
actually brainstorming and writing our use cases?
Let's look at each step in detail...
1. identify actors and their goals
2. write the main success scenario
3. identify and list possible failure extensions
4. describe how the system handles each failure
23
1. Identify actors and goals
Ask oneself the following questions:
 what computers, subsystems and people will
drive our system? (actors)
 examples: Customer, Clerk, Corporate Mainframe
 what does each actor need our system to
do?
 each need may show up as a trigger to a use
case
result: a list of use cases, a sketch of the
24
Identify actors/goals
example
 exercise:
Together, let's identify some major actors and their
goals for software for a video store kiosk system.
The software can be used for looking up movies
and actors by keywords, as well as usable to check
out movies from the kiosk to known customers,
without a cashier present. A customer can check
out up to 3 movies at a time, for up to 5 days each.
If a movie is returned late, late fees can be paid at
the time of return or time of next checkout. The
data is stored internally in a database system,
which communicates with the kiosk. The manager
of the store can log in to update employee data.
25
2. Write the success scenario
 main success scenario is the preferred
"happy" case

example: customer=good credit and item=in stock

easiest to read and understand

everything else is a complication on this
 capture each actor's intent and
responsibility, from trigger to goal delivery

say what information passes between them

number each line
exercise: Let's do this for the Customer
Returns a Movie scenario.
26
3. List the failure extensions
 usually, almost every step can fail
 example: customer has bad credit
 example: item is not in stock in desired quantity
 note the failure condition separately, after
the main success scenario
exercise: Let's do this for the Customer
Returns a Movie scenario.
27
4. Describe failure-handling
 recoverable extensions rejoin main course

example: low credit + valued customer -> accept

example: low stock + reduce quantity -> accept
 non-recoverable extensions fail directly

not a valued customer -> decline order

out of stock -> decline order
 each scenario goes from trigger to
completion

"extensions" are merely a writing shorthand

can write "if" statements

can write each scenario from beginning to end
exercise: Let's do this for the Customer
Returns a Movie scenario.
28
Pros and cons of use cases
pro:
 they hold functional requirements in an
easy-to-read text format
 they make a good framework for
non-functional requirements & project
scheduling
con:
 they show only the functional reqs
 design is not done only in use case units
29
User stories (usage
narratives)
 user story: narrative told from user's perspective,
describing his/her usage of the system
 Example:
Bill is a marine biologist who wants to see an article about
fish. He selects "Article or journal" from the menu. He
chooses topic "fish" from the subsequent list shown. The
system returns articles to Bill about his chosen topic. The
annotated list designates the physical location of articles.
Bill clicks articles of interest to him. Abstracts of each
flagged article are displayed. Bill makes a final selection of
articles based on abstracts. The abstracts are printed, and
Bill retrieves them from the printer.
 How is this different from an informal use case?
 too personal; too focused on UI; contains non-software details
(printing)
30
How do use cases fit in?
 "Hub and spokes" model puts use cases as central
to all requirements
 Adolph's "Discovering" Requirements in New Territory
 What do you think?
 use cases help us
discover functional
requirements in our
system and
document them
 Do use cases affect
UI design decisions?
31
Use case exercises
 Consider the case of a video store that wants
a kiosk with intelligent software that can
replace human checkout workers. A
customer with an account can simply use
their membership and credit card with a
reader at the kiosk to check out a video.
 Come up with 5 use case names for such
software, and draw a UML use case diagram of
these cases and their actors.
 Write a formal (complete) use case for the
Customer Checks Out a Movie scenario.
Ad

Recommended

lecture 04 use cases unified modelling language
lecture 04 use cases unified modelling language
CarmenElizabeth13
 
Use case diagram with example of illustration
Use case diagram with example of illustration
Sivam Chinna
 
Defining The System
Defining The System
Sandeep Ganji
 
Lecture7 use case modeling
Lecture7 use case modeling
Shahid Riaz
 
Software Requirements ElicitationRequirements specify a set of f.docx
Software Requirements ElicitationRequirements specify a set of f.docx
whitneyleman54422
 
Sadcw 7e chapter05-done
Sadcw 7e chapter05-done
LamineKaba6
 
Refining The System Definition
Refining The System Definition
Sandeep Ganji
 
Sadcw 7e chapter03-done(1)
Sadcw 7e chapter03-done(1)
LamineKaba6
 
Analysis-Models jjjkkkkjgffffffttui3k3k3j3n
Analysis-Models jjjkkkkjgffffffttui3k3k3j3n
mhuzaifasultan8
 
Use Case UML Diagram
Use Case UML Diagram
University of Texas at Dallas
 
Jar chapter 3
Jar chapter 3
Reham Maher El-Safarini
 
SE_Lec 08_UML Use Cases
SE_Lec 08_UML Use Cases
Amr E. Mohamed
 
Use case Diagram
Use case Diagram
Preeti Mishra
 
SADCW_7e_Chapter03.pptx
SADCW_7e_Chapter03.pptx
SiphiweMakaNtandOlwe
 
Use Case
Use Case
Kaushik Maitra
 
Lec-9.ppt
Lec-9.ppt
HassanFayyazAhmad
 
OOAD U1.pptx
OOAD U1.pptx
anguraju1
 
Chapter 8Understanding User Requirements1© Karl E
Chapter 8Understanding User Requirements1© Karl E
JinElias52
 
Lecture05
Lecture05
artgreen
 
Lecture05
Lecture05
artgreen
 
Lecture05
Lecture05
artgreen
 
Lecture05
Lecture05
artgreen
 
Design Implementation ProposalDesign Implementation Proposal.docx
Design Implementation ProposalDesign Implementation Proposal.docx
theodorelove43763
 
PPT ch 3 Requirement Analysis and Specification.pptx
PPT ch 3 Requirement Analysis and Specification.pptx
fillformadarsh
 
Onlineshopping 121105040955-phpapp02
Onlineshopping 121105040955-phpapp02
Shuchi Singla
 
Onlineshoppingonline shopping
Onlineshoppingonline shopping
Hardik Padhy
 
From Use case to User Story
From Use case to User Story
Kunta Hutabarat
 
Financial Analysis of Berlin Brandenburg AirportTotal of 3000 wo
Financial Analysis of Berlin Brandenburg AirportTotal of 3000 wo
ChereCheek752
 
15 march -22 march 2024 short term program
15 march -22 march 2024 short term program
NALESVPMEngg
 
Unit I _ Lecture PPT INTRODUCTION TO IOT PPT (2).pptx
Unit I _ Lecture PPT INTRODUCTION TO IOT PPT (2).pptx
NALESVPMEngg
 

More Related Content

Similar to 02-use_cases in Unified modeling languages (20)

Analysis-Models jjjkkkkjgffffffttui3k3k3j3n
Analysis-Models jjjkkkkjgffffffttui3k3k3j3n
mhuzaifasultan8
 
Use Case UML Diagram
Use Case UML Diagram
University of Texas at Dallas
 
Jar chapter 3
Jar chapter 3
Reham Maher El-Safarini
 
SE_Lec 08_UML Use Cases
SE_Lec 08_UML Use Cases
Amr E. Mohamed
 
Use case Diagram
Use case Diagram
Preeti Mishra
 
SADCW_7e_Chapter03.pptx
SADCW_7e_Chapter03.pptx
SiphiweMakaNtandOlwe
 
Use Case
Use Case
Kaushik Maitra
 
Lec-9.ppt
Lec-9.ppt
HassanFayyazAhmad
 
OOAD U1.pptx
OOAD U1.pptx
anguraju1
 
Chapter 8Understanding User Requirements1© Karl E
Chapter 8Understanding User Requirements1© Karl E
JinElias52
 
Lecture05
Lecture05
artgreen
 
Lecture05
Lecture05
artgreen
 
Lecture05
Lecture05
artgreen
 
Lecture05
Lecture05
artgreen
 
Design Implementation ProposalDesign Implementation Proposal.docx
Design Implementation ProposalDesign Implementation Proposal.docx
theodorelove43763
 
PPT ch 3 Requirement Analysis and Specification.pptx
PPT ch 3 Requirement Analysis and Specification.pptx
fillformadarsh
 
Onlineshopping 121105040955-phpapp02
Onlineshopping 121105040955-phpapp02
Shuchi Singla
 
Onlineshoppingonline shopping
Onlineshoppingonline shopping
Hardik Padhy
 
From Use case to User Story
From Use case to User Story
Kunta Hutabarat
 
Financial Analysis of Berlin Brandenburg AirportTotal of 3000 wo
Financial Analysis of Berlin Brandenburg AirportTotal of 3000 wo
ChereCheek752
 
Analysis-Models jjjkkkkjgffffffttui3k3k3j3n
Analysis-Models jjjkkkkjgffffffttui3k3k3j3n
mhuzaifasultan8
 
SE_Lec 08_UML Use Cases
SE_Lec 08_UML Use Cases
Amr E. Mohamed
 
OOAD U1.pptx
OOAD U1.pptx
anguraju1
 
Chapter 8Understanding User Requirements1© Karl E
Chapter 8Understanding User Requirements1© Karl E
JinElias52
 
Design Implementation ProposalDesign Implementation Proposal.docx
Design Implementation ProposalDesign Implementation Proposal.docx
theodorelove43763
 
PPT ch 3 Requirement Analysis and Specification.pptx
PPT ch 3 Requirement Analysis and Specification.pptx
fillformadarsh
 
Onlineshopping 121105040955-phpapp02
Onlineshopping 121105040955-phpapp02
Shuchi Singla
 
Onlineshoppingonline shopping
Onlineshoppingonline shopping
Hardik Padhy
 
From Use case to User Story
From Use case to User Story
Kunta Hutabarat
 
Financial Analysis of Berlin Brandenburg AirportTotal of 3000 wo
Financial Analysis of Berlin Brandenburg AirportTotal of 3000 wo
ChereCheek752
 

More from NALESVPMEngg (17)

15 march -22 march 2024 short term program
15 march -22 march 2024 short term program
NALESVPMEngg
 
Unit I _ Lecture PPT INTRODUCTION TO IOT PPT (2).pptx
Unit I _ Lecture PPT INTRODUCTION TO IOT PPT (2).pptx
NALESVPMEngg
 
bstract Point processing uses only the information in individual pixels to pr...
bstract Point processing uses only the information in individual pixels to pr...
NALESVPMEngg
 
a simple idealized machine used to recognize patterns within input taken from...
a simple idealized machine used to recognize patterns within input taken from...
NALESVPMEngg
 
Stemming is one of several text normalization techniques that converts raw te...
Stemming is one of several text normalization techniques that converts raw te...
NALESVPMEngg
 
Information retrieval is the process of accessing data resources. Usually doc...
Information retrieval is the process of accessing data resources. Usually doc...
NALESVPMEngg
 
Information retrieval is the process of accessing data resources. Usually doc...
Information retrieval is the process of accessing data resources. Usually doc...
NALESVPMEngg
 
Class diagrams are a type of UML (Unified Modeling Language) diagram used in ...
Class diagrams are a type of UML (Unified Modeling Language) diagram used in ...
NALESVPMEngg
 
Class diagrams are a type of UML (Unified Modeling Language) diagram used in ...
Class diagrams are a type of UML (Unified Modeling Language) diagram used in ...
NALESVPMEngg
 
Activity diagrams show the flow of one activity to another within a system or...
Activity diagrams show the flow of one activity to another within a system or...
NALESVPMEngg
 
Activity diagrams show the flow of one activity to another within a system or...
Activity diagrams show the flow of one activity to another within a system or...
NALESVPMEngg
 
Introduction to Csharp (C-Sharp) is a programming language developed by Micro...
Introduction to Csharp (C-Sharp) is a programming language developed by Micro...
NALESVPMEngg
 
Wk5_UML_ActivityDiagram.pptx
Wk5_UML_ActivityDiagram.pptx
NALESVPMEngg
 
TutorialUML.pptx
TutorialUML.pptx
NALESVPMEngg
 
6 Use Case Modeling.pptx
6 Use Case Modeling.pptx
NALESVPMEngg
 
Introduction To Data Structures.ppt
Introduction To Data Structures.ppt
NALESVPMEngg
 
Introduction To Algorithms.ppt
Introduction To Algorithms.ppt
NALESVPMEngg
 
15 march -22 march 2024 short term program
15 march -22 march 2024 short term program
NALESVPMEngg
 
Unit I _ Lecture PPT INTRODUCTION TO IOT PPT (2).pptx
Unit I _ Lecture PPT INTRODUCTION TO IOT PPT (2).pptx
NALESVPMEngg
 
bstract Point processing uses only the information in individual pixels to pr...
bstract Point processing uses only the information in individual pixels to pr...
NALESVPMEngg
 
a simple idealized machine used to recognize patterns within input taken from...
a simple idealized machine used to recognize patterns within input taken from...
NALESVPMEngg
 
Stemming is one of several text normalization techniques that converts raw te...
Stemming is one of several text normalization techniques that converts raw te...
NALESVPMEngg
 
Information retrieval is the process of accessing data resources. Usually doc...
Information retrieval is the process of accessing data resources. Usually doc...
NALESVPMEngg
 
Information retrieval is the process of accessing data resources. Usually doc...
Information retrieval is the process of accessing data resources. Usually doc...
NALESVPMEngg
 
Class diagrams are a type of UML (Unified Modeling Language) diagram used in ...
Class diagrams are a type of UML (Unified Modeling Language) diagram used in ...
NALESVPMEngg
 
Class diagrams are a type of UML (Unified Modeling Language) diagram used in ...
Class diagrams are a type of UML (Unified Modeling Language) diagram used in ...
NALESVPMEngg
 
Activity diagrams show the flow of one activity to another within a system or...
Activity diagrams show the flow of one activity to another within a system or...
NALESVPMEngg
 
Activity diagrams show the flow of one activity to another within a system or...
Activity diagrams show the flow of one activity to another within a system or...
NALESVPMEngg
 
Introduction to Csharp (C-Sharp) is a programming language developed by Micro...
Introduction to Csharp (C-Sharp) is a programming language developed by Micro...
NALESVPMEngg
 
Wk5_UML_ActivityDiagram.pptx
Wk5_UML_ActivityDiagram.pptx
NALESVPMEngg
 
6 Use Case Modeling.pptx
6 Use Case Modeling.pptx
NALESVPMEngg
 
Introduction To Data Structures.ppt
Introduction To Data Structures.ppt
NALESVPMEngg
 
Introduction To Algorithms.ppt
Introduction To Algorithms.ppt
NALESVPMEngg
 
Ad

Recently uploaded (20)

MATERIAL SCIENCE LECTURE NOTES FOR DIPLOMA STUDENTS
MATERIAL SCIENCE LECTURE NOTES FOR DIPLOMA STUDENTS
SAMEER VISHWAKARMA
 
Rapid Prototyping for XR: Lecture 2 - Low Fidelity Prototyping.
Rapid Prototyping for XR: Lecture 2 - Low Fidelity Prototyping.
Mark Billinghurst
 
Structural Wonderers_new and ancient.pptx
Structural Wonderers_new and ancient.pptx
nikopapa113
 
Introduction to Natural Language Processing - Stages in NLP Pipeline, Challen...
Introduction to Natural Language Processing - Stages in NLP Pipeline, Challen...
resming1
 
Fatality due to Falls at Working at Height
Fatality due to Falls at Working at Height
ssuserb8994f
 
دراسة حاله لقرية تقع في جنوب غرب السودان
دراسة حاله لقرية تقع في جنوب غرب السودان
محمد قصص فتوتة
 
Modern multi-proposer consensus implementations
Modern multi-proposer consensus implementations
François Garillot
 
machine learning is a advance technology
machine learning is a advance technology
ynancy893
 
Industrial internet of things IOT Week-3.pptx
Industrial internet of things IOT Week-3.pptx
KNaveenKumarECE
 
Introduction to Python Programming Language
Introduction to Python Programming Language
merlinjohnsy
 
DESIGN OF REINFORCED CONCRETE ELEMENTS S
DESIGN OF REINFORCED CONCRETE ELEMENTS S
prabhusp8
 
Deep Learning for Natural Language Processing_FDP on 16 June 2025 MITS.pptx
Deep Learning for Natural Language Processing_FDP on 16 June 2025 MITS.pptx
resming1
 
Complete University of Calculus :: 2nd edition
Complete University of Calculus :: 2nd edition
Shabista Imam
 
retina_biometrics ruet rajshahi bangdesh.pptx
retina_biometrics ruet rajshahi bangdesh.pptx
MdRakibulIslam697135
 
May 2025: Top 10 Read Articles in Data Mining & Knowledge Management Process
May 2025: Top 10 Read Articles in Data Mining & Knowledge Management Process
IJDKP
 
Complete guidance book of Asp.Net Web API
Complete guidance book of Asp.Net Web API
Shabista Imam
 
System design handwritten notes guidance
System design handwritten notes guidance
Shabista Imam
 
Tesla-Stock-Analysis-and-Forecast.pptx (1).pptx
Tesla-Stock-Analysis-and-Forecast.pptx (1).pptx
moonsony54
 
CST413 KTU S7 CSE Machine Learning Clustering K Means Hierarchical Agglomerat...
CST413 KTU S7 CSE Machine Learning Clustering K Means Hierarchical Agglomerat...
resming1
 
20CE404-Soil Mechanics - Slide Share PPT
20CE404-Soil Mechanics - Slide Share PPT
saravananr808639
 
MATERIAL SCIENCE LECTURE NOTES FOR DIPLOMA STUDENTS
MATERIAL SCIENCE LECTURE NOTES FOR DIPLOMA STUDENTS
SAMEER VISHWAKARMA
 
Rapid Prototyping for XR: Lecture 2 - Low Fidelity Prototyping.
Rapid Prototyping for XR: Lecture 2 - Low Fidelity Prototyping.
Mark Billinghurst
 
Structural Wonderers_new and ancient.pptx
Structural Wonderers_new and ancient.pptx
nikopapa113
 
Introduction to Natural Language Processing - Stages in NLP Pipeline, Challen...
Introduction to Natural Language Processing - Stages in NLP Pipeline, Challen...
resming1
 
Fatality due to Falls at Working at Height
Fatality due to Falls at Working at Height
ssuserb8994f
 
دراسة حاله لقرية تقع في جنوب غرب السودان
دراسة حاله لقرية تقع في جنوب غرب السودان
محمد قصص فتوتة
 
Modern multi-proposer consensus implementations
Modern multi-proposer consensus implementations
François Garillot
 
machine learning is a advance technology
machine learning is a advance technology
ynancy893
 
Industrial internet of things IOT Week-3.pptx
Industrial internet of things IOT Week-3.pptx
KNaveenKumarECE
 
Introduction to Python Programming Language
Introduction to Python Programming Language
merlinjohnsy
 
DESIGN OF REINFORCED CONCRETE ELEMENTS S
DESIGN OF REINFORCED CONCRETE ELEMENTS S
prabhusp8
 
Deep Learning for Natural Language Processing_FDP on 16 June 2025 MITS.pptx
Deep Learning for Natural Language Processing_FDP on 16 June 2025 MITS.pptx
resming1
 
Complete University of Calculus :: 2nd edition
Complete University of Calculus :: 2nd edition
Shabista Imam
 
retina_biometrics ruet rajshahi bangdesh.pptx
retina_biometrics ruet rajshahi bangdesh.pptx
MdRakibulIslam697135
 
May 2025: Top 10 Read Articles in Data Mining & Knowledge Management Process
May 2025: Top 10 Read Articles in Data Mining & Knowledge Management Process
IJDKP
 
Complete guidance book of Asp.Net Web API
Complete guidance book of Asp.Net Web API
Shabista Imam
 
System design handwritten notes guidance
System design handwritten notes guidance
Shabista Imam
 
Tesla-Stock-Analysis-and-Forecast.pptx (1).pptx
Tesla-Stock-Analysis-and-Forecast.pptx (1).pptx
moonsony54
 
CST413 KTU S7 CSE Machine Learning Clustering K Means Hierarchical Agglomerat...
CST413 KTU S7 CSE Machine Learning Clustering K Means Hierarchical Agglomerat...
resming1
 
20CE404-Soil Mechanics - Slide Share PPT
20CE404-Soil Mechanics - Slide Share PPT
saravananr808639
 
Ad

02-use_cases in Unified modeling languages

  • 1. 1 TCSS 360, Spring 2005 Lecture Notes Use Cases Relevant Reading: Writing Effective Use Cases A. Cockburn
  • 2. 2 Use cases  use cases: written descriptions of user's interaction with the software product to accomplish a goal  (in a business system): "A sequence of transactions in a system whose task is to yield a result of measurable value to an individual actor of the business system"  (in an information system): "A behaviorally related sequence of transactions performed by an actor in a dialogue with the system to provide some measurable value to the actor" (Jacobson 1995)  Use cases are the ways in which a system can be used (the functions which the system provides to its users)  Use cases help us discover/document requirements
  • 3. 3 Benefits of doing use cases  The list of goal names provides executives:  Shortest summary of what system will contribute  Project planning skeleton (priorities & timing)  The main success scenario provides all:  Agreement as to the system’s responsibilities  The extension conditions provide programmers:  List of things programmers have to watch for  List of things analysts have to investigate  The extension handling steps provide dev team:  Record of (tricky) business policy decisions
  • 4. 4 Cockburn's requirements list Requirements Outline (p13-14) - good template of all functional requirements 1. purpose and scope 2. terms / glossary 3. use cases 4. technology used 5. other 5a. development process - participants, values (fast- good-cheap), visibility, competition, dependencies 5b. business rules / constraints 5c. performance demands 5d. security (now a hot topic), documentation 5e. usability 5f. portability 5g. unresolved / deferred 6. human issues: legal, political, organizational, training
  • 5. 5 Actors and stakeholders  What is an actor? A primary actor?  What is the difference between an actor and a stakeholder?  actor: anything with behavior that acts on the system  primary actor: initiates interaction to achieve goal (when system is a software product, primary actor is often the computer user)  supporting actor: performs sub-goals to help use case  stakeholder: anyone interested in the system  examples: supplier, stock agency, vendor  the difference: stakeholder might not "act" in any scenario
  • 6. 6 Use case goals and levels  goal: action that actor wants to accomplish  level: type / scope of a goal  summary goals ("above sea level"): multi- sitting  user goals ("sea-level"): one sitting  subfunctions ("below sea level"): partial user goal summary goal subfunction Why? How? What?
  • 7. 7 Goals and levels, examples  Withdraw money from an ATM  level?  Purchase a book from the online store, and have it shipped to the user; can be cancelled while in transit  level?  Purchase shares of stock online using a "stock trap."  level?  Update user's balance after a deposit. user goal summary goal summary goal subfunction
  • 8. 8 Qualities of a good use case  a good use case:  starts with a request from an actor to the system  ends with the production of all the answers to the request  defines the interactions (between system and actors) related to the function  takes into account the actor's point of view, not the system's  focuses on interaction, not internal system activities  doesn't describe the GUI in detail  has 3-9 steps in the main success scenario 
  • 9. 9 Use cases vs. internal features  consider software to run a cell phone: Use Cases  call someone  receive a call  send a message  memorize a number Point of view: user Internal Functions  transmit / receive data  energy (battery)  user I/O (display, keys, ...)  phone-book mgmt. Point of view: developer / designer
  • 10. 10 Do use cases capture these?  Which of these requirements should be represented directly in a use case?  Order cost = order item costs * 1.06 tax.  Promotions may not run longer than 6 months.  Customers only become Preferred after 1 year.  A customer has one and only one sales contact.  Response time is less than 2 seconds.  Uptime requirement is 99.8%.  Number of simultaneous users will be 200 max. Answer: NONE. Most of these requirements are non- functional, so the use cases wouldn't explicitly mention them. The user doesn't see them directly in the success
  • 11. 11 Styles of use cases 1. actor / goal list or UML use case diagram  shows all use cases in system 2. informal use case 3. formal use case Let's examine each of these in detail...
  • 12. 12 1. Actor / goal list  it can be useful to create a list or table of actors and their "goals" (use cases they start): ACTORS USE CASE Club Member Initiates Submit Promotion Order Submit Regular Order Potential Member Initiates Submit New Subscription Past Member Initiates Submit Subscription Renewal Membership Services Dept. Initiates Request Membership Marketing Department Initiates Create New Monthly Promotion Create New Seasonal Promotion Create New Subscription Program Request Promotion Reports Request Sales Reports Membership Services System Initiates Send New Subscription Offer Send Club Promotion Send Subscription Renewal
  • 13. 13 UML use case diagrams  use cases can be drawn as diagrams, with:  actors as stick-men, with their names below  use cases as ellipses with their names below or inside  association indicated by lines, connecting an actor to a use case in which that actor participates  use cases can be connected to other cases that they use / rely on customer open account
  • 15. 15 Example use case diagram 2 Control System Set limits Calibrate Take profile Scan Liason Physicist Hardware Specialist Experimental Physicist
  • 16. 16 Example use case diagram 3 Order Food Hire Employee Reorder supplies Produce mgt. reports Track sales and inv. data <<uses>> <<uses>> Customer Applicant Supplier Service Person Manager
  • 17. 17 2. Informal use case  informal use case: written as a paragraph describing the scenario  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.
  • 19. 19 Formal use case elements "Place an order" (User goal / Clerk) Main scenario: 1. Clerk identifies customer, item and quantity. 2. System accepts and queues the order. Extensions: 1a. Low credit & Customer is 'Preferred': 1a1. System gives them credit anyway. 1b. Low credit & not 'Preferred' customer: 1b1. Clerk performs Sign Up Preferred Customer scenario and accepts only prepayment. 2a. Low on stock: Customer accepts rain-check: 2a1. Clerk reduces order to available stock level. (goal of primary actor) (level of goal [summary, user, subfunction]) (action steps: full sentences showing who takes the action! 3 - 9 steps long.) (condition causing different actions) (action step(s) handling those conditions) (primary actor) (calling another use case)
  • 20. 20 Example use case Use Case 12. Buy stocks over the web Primary Actor: Purchaser (user) Scope: PAF Level: user goal Precondition: User already has PAF open. Guarantees: sufficient log information exists that PAF can detect what went wrong. Success Guarantees: remote web site acknowledged purchase, user's portfolio updated. Main success scenario: 1. User selects to buy stocks over the web. 2. PAF gets name of web site to use (E*Trade, Schwabb, etc.) 3. PAF opens web connection to the site, retaining control. 4. User browses and buys stock from the web site. 5. PAF intercepts responses from the web site, and updates the user's portfolio. 6. PAF shows the user the new portfolio standing. Extensions: 2a. User wants a web site PAF does not support: 2a1. System gets new suggestion from user, with option to cancel use case. 3a. ...
  • 21. 21 Use case tables  formal use cases can also be written as a table: USE CASE NAME Submit Promotion Order ACTOR Club Member DESCRIPTION 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 promotion 1. This use is initiated when the club member submits the promotion order to be proceeded 2. The club member's personal information such as address is validated against what is currently recorded in member services 3. The promotion order is verified to see if product is being ordered 4. The club member's credit status is checked with Accounts Receivable to make sure no payments are outstanding 5. For each product being ordered, validate the product number 6. 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 status of "open" 7. Create a Picking Ticket for the promotion order containing all ordered products which have a status "open" Normal Course 8. Route the picking ticket to the warehouse PRECONDITION Use case send club promotion has been processed POST CONDITION Promotion order has been recorded and the picking ticket has been routed to the warehouse ASSUMPTIONS
  • 22. 22 One method to do use cases Now that we know the syntax for doing use cases, what 4 steps does Cockburn recommend when actually brainstorming and writing our use cases? Let's look at each step in detail... 1. identify actors and their goals 2. write the main success scenario 3. identify and list possible failure extensions 4. describe how the system handles each failure
  • 23. 23 1. Identify actors and goals Ask oneself the following questions:  what computers, subsystems and people will drive our system? (actors)  examples: Customer, Clerk, Corporate Mainframe  what does each actor need our system to do?  each need may show up as a trigger to a use case result: a list of use cases, a sketch of the
  • 24. 24 Identify actors/goals example  exercise: Together, let's identify some major actors and their goals for software for a video store kiosk system. The software can be used for looking up movies and actors by keywords, as well as usable to check out movies from the kiosk to known customers, without a cashier present. A customer can check out up to 3 movies at a time, for up to 5 days each. If a movie is returned late, late fees can be paid at the time of return or time of next checkout. The data is stored internally in a database system, which communicates with the kiosk. The manager of the store can log in to update employee data.
  • 25. 25 2. Write the success scenario  main success scenario is the preferred "happy" case  example: customer=good credit and item=in stock  easiest to read and understand  everything else is a complication on this  capture each actor's intent and responsibility, from trigger to goal delivery  say what information passes between them  number each line exercise: Let's do this for the Customer Returns a Movie scenario.
  • 26. 26 3. List the failure extensions  usually, almost every step can fail  example: customer has bad credit  example: item is not in stock in desired quantity  note the failure condition separately, after the main success scenario exercise: Let's do this for the Customer Returns a Movie scenario.
  • 27. 27 4. Describe failure-handling  recoverable extensions rejoin main course  example: low credit + valued customer -> accept  example: low stock + reduce quantity -> accept  non-recoverable extensions fail directly  not a valued customer -> decline order  out of stock -> decline order  each scenario goes from trigger to completion  "extensions" are merely a writing shorthand  can write "if" statements  can write each scenario from beginning to end exercise: Let's do this for the Customer Returns a Movie scenario.
  • 28. 28 Pros and cons of use cases pro:  they hold functional requirements in an easy-to-read text format  they make a good framework for non-functional requirements & project scheduling con:  they show only the functional reqs  design is not done only in use case units
  • 29. 29 User stories (usage narratives)  user story: narrative told from user's perspective, describing his/her usage of the system  Example: Bill is a marine biologist who wants to see an article about fish. He selects "Article or journal" from the menu. He chooses topic "fish" from the subsequent list shown. The system returns articles to Bill about his chosen topic. The annotated list designates the physical location of articles. Bill clicks articles of interest to him. Abstracts of each flagged article are displayed. Bill makes a final selection of articles based on abstracts. The abstracts are printed, and Bill retrieves them from the printer.  How is this different from an informal use case?  too personal; too focused on UI; contains non-software details (printing)
  • 30. 30 How do use cases fit in?  "Hub and spokes" model puts use cases as central to all requirements  Adolph's "Discovering" Requirements in New Territory  What do you think?  use cases help us discover functional requirements in our system and document them  Do use cases affect UI design decisions?
  • 31. 31 Use case exercises  Consider the case of a video store that wants a kiosk with intelligent software that can replace human checkout workers. A customer with an account can simply use their membership and credit card with a reader at the kiosk to check out a video.  Come up with 5 use case names for such software, and draw a UML use case diagram of these cases and their actors.  Write a formal (complete) use case for the Customer Checks Out a Movie scenario.

Editor's Notes

  • #19: Why was this important? It clarified our vocabulary and It included all the parts we needed to function Discuss other ways to write use cases narrative formal scripts