SlideShare a Scribd company logo
Use Case Modeling
What is a Use Case?
 Narrative descriptions of domain processes in
a structured prose format
 They are stories or scenarios of how people
use the system
Case Study – The NextGen POS System
 Computerized application used to record sales
and handle payments
 Used in retail store
 It includes hardware and software
It also interfaces to other applications, such as a third-
party tax calculator and inventory control
 Multiple and varied clients-side terminals and
interfaces
 Commercial POS
Use Case, Actor, and Scenario
 Actors
 Something with behavior such as person, computer system, or
organization
 Scenario
 It is a specific sequence of actions and interactions between
actors and the system. It is also called use case instance
 It is one particular story of using a system
 E.g. scenario of successfully purchasing items with cash or scenario
of failing to purchase items because of credit payment denial
 Use case then is a collection of success and failure
scenarios
 Use cases are requirements, primarily functional.
Use Case, Actor, and Scenario
 A UC is a dialogue between an Actor and a
system that accomplishes a task.
 The dialogue is presented as a sequence of
steps
 A complete sequence of steps is a use case
scenario
Use Case, Actor, and Scenario
UC can contain multiple scenarios
Can range from simple (brief summary) to
elaborate (detailed steps using adopted
document template)
UCs are NOT object-oriented artifacts!
They feed into other OO models
Use Cases
 Kinds of Actors
Primary actor
has user goals fulfilled through using services of the SuD
Why identify? To find user goals, which drive the use
cases.
Supporting actor
provides a service (for example, information) to the SuD
Why identify? To clarify external interfaces and protocols.
Offstage actor
has an interest in the behavior of the use case
Why identify? To ensure that all necessary interests are
identified and satisfied.
Use Cases
Guidelines
How to find use cases
1.Choose the system boundary
2.Find primary actors
3.Identify goals for each primary actor
4.Define Use cases that satisfy user goals
1. System Boundary
Goal: Process sales
Cashier
Customer
POS System
Checkout Service
Goal: Buy items
Enterprise Selling Things
Sales Tax
Agency
Goal: Collect
taxes on sales Sales Activity
System
Goal: Analyze sales
and performance data
2 and 3. Primary actors and Goals
 Brainstorm the primary actors first.
 Questions to help identify Actors and Goals
Who starts and stops the system?
Who does user and security management?
Who does system administration?
Is “Time” an actor because the system does
something in response to a time event?
Are there any external software system that call upon
the services of the system?
 Organize the actors and goals in an Actor Goal
List
NextGen POS
Manage Users
. . .
Cashier
System
Administrator
actor
use case
communicationsystem boundary
Payment
Authorization
Service
«actor»
Tax Calculator
«actor»
Accounting
System
alternate
notation for
a computer
system actor
«actor»
HR System
Cash In
«actor»
Sales Activity
System
Manage Security
Analyze Activity
Customer
Manager
Process Sale
Handle Returns
4. Define Use cases for user goals
NextGen
Process Sale
. . .
Cashier
Show computer system actors
with an alternate notation to
human actors.
primary actors on
the left
supporting actors
on the right
For a use case context
diagram, limit the use cases to
user-goal level use cases.
«actor»
Payment
Authorization
Service
Alternate Actor Notation
NextGen
Process Sale
«system»
Payment
Authorization
Service
...
«actor»
Payment
Authorization
Service
Some UML alternatives to
illustrate external actors that
are other computer systems.
The class box style can be
used for any actor, computer or
human. Using it for computer
actors provides visual
distinction.
Payment
Authorization
Service
Writing Use Cases
 Use cases are text documents, not diagrams
and use case modeling is primarily an act of
writing text, not drawing diagrams.
 Use Case Style
Black Box Use cases
 Focus on what not how
 Use Case Formats
Brief
Casual
Fully dressed
Black Box Use cases
Use Case Formats
Brief
Use Case Formats
Causal
Fully dressed
Use case Section Comment
Use case name Start with a verb
Scope The system under design
Level “user goal” or “sub function”
Primary Actor Calls on system to deliver its services
Stakeholders and interests who cares about the system and what do
they want
Preconditions what must be true on start
Success Guarantee What must be true on successful completion
Main Success Scenario Unconditional happy path scenario of
success
Extensions Alternate scenario of success or failure
Special Requirements Related NFRs
Technology and Data variation list Varying I/O methods
Frequency of occurrence Influences investigation, testing
Miscellaneous Open issues
Process Sale Use Case
 UC: Process Sale
1. User selects new sale option
2. System requests item identifier
3. User enters item identifier
4. System records sale of item, and
5. System displays item description, price, current total
Steps 2-5 repeated until user finished
6. User selects sale finished option
7. System displays total and taxes due
8. User selects payment option
9. System requests payment information
10. User enters payment information
11. System handles payment
12. System logs completed sale and sends sale information to Accounting
System and Inventory System
13. System generates receipt
What Tests Can Help in Finding Useful Use
Cases?
 The Boss Test
 The EBP Test: A task performed by 1 user in 1 place at
1 time in response to a business event, that adds
measurable value to the business and leaves data in a
consistent state.
 The Size Test
 Examples: Applying the tests
 Negotiate the supplier contract: could be modeled as
business use case
 Handle returns: OK with boss. Seems like an EBP
 Login: boss not happy if this is all you do all day!
 Move a piece on game board: Single step, Fails the size test
Library Use Case Diagram
 A computerized library system for a
university keeps track of all books and
periodicals in the library and their
check-out status.
 Checkout and return are automated
through a bar code reader (an external
device).
 The library system also interfaces with
an external relational database which
stores information about the library
users (students, faculty, and staff),
including whether they have any library
items checked out.
 Library users can access the catalog
and recall books and periodicals.
 Library employees have the same
access as well as additional
capabilities (e.g., listing the status of
an item).
 Note: the library catalog is part of the
library computer system so it is not
shown as an actor.
EmployeeLogin
LibEmployee
CheckAvailability
LibUser
Recall
CheckOut
BarCodeReader
CheckIn
UsersDB
Use Case for Employee Login
1. Employee initiates use case
by entering user name
2. System prompts for password
3. If password is valid, employee
is logged on and now has
access to employee
commands
 Starting and Ending
Conditions?
 Exceptions? e.g., cannot find
the employee login
EmployeeLogin
LibEmployee
CheckAvailability
LibUser
Recall
CheckOut
BarCodeReader
CheckIn
UsersDB
Use Case for Check Book Availability
1. User/Employee initiates use case
by selecting the check book
availability option
2. System prompts for choice of
search by title, author, or call
number
3. User makes selection and enters
title, author or call number
4. System performs search through
the library catalog database
5. If a match is found, system
displays item status (not checked
out, checked out and due date,
overdue)
 Starting and Ending Conditions?
 Exceptions?
EmployeeLogin
LibEmployee
CheckAvailability
LibUser
Recall
CheckOut
BarCodeReader
CheckIn
UsersDB
Terminology: Concrete, Abstract, Base,
and Addition Use Cases
 Concrete use case
 is initiated by an actor
 is an EBP use case
 e.g., Process Sale
 Abstract use case
 is never instantiated by itself
 is a sub-function use case (part of another use case)
 e.g., Handle Credit Payment
 Base use case
 that includes another use case, or that is extended or specialized by
another use case
 e.g., Process Sale with respect to the included Handle Credit Payment
 Addition use case
 that is an inclusion, extension, or specialization
 Handle Credit Payment in the include relationship to Process Sale
 Addition use cases are usually abstract
 Base use cases are usually concrete
Use Case Associations
Use case association = relationship
between use cases
Important types:
Include
A use case uses another use case (functional
decomposition and reuse of existing functionality)
Extends
A use case extends another use case
Generalization
A use case has different specializations
≪Include≫: Functional Decomposition
 Problem:
 A function in the original problem statement is too complex to be
solvable immediately
 Solution:
 Describe the function as the aggregation of a set of simpler
functions. The associated use case is decomposed into smaller
use cases
CreateDocument
Scan OCR Check
≪include≫
≪include≫
≪include≫
≪Include≫: Reuse of Existing Functionality
 Problem:
 There are already existing functions. How can we reuse them?
 Solution:
 The include association from Use Case A to Use Case B indicates that
an instance of A performs all the behavior described in B (“A delegates
to B”)
 Example:
 The use case “ViewMap” describes behavior that can be used by the
use case “OpenIncident” (“ViewMap” is factored out)
 Note: The base use case cannot exist alone. It is always called with the
supplier use case
ViewMap
OpenIncident
AllocateResources
≪include≫
Base Use
Case Supplier
Use Case
≪include≫
Example: Include Relationship
UC1: Process Sale
 …
 Main Success Scenario:
1. Customer arrives at a POS checkout with goods and/or
services to purchase
.…
7. Customer pays and System handles payment.
…
 Extensions:
7b. Paying by credit: Include Handle Credit Payment.
7c. Paying by cash: Include Handle Cash Payment.
…
Example: Include Relationship cont…
UC12: Handle Credit Payment
 …
 Level: Sub-function
 Main Success Scenario:
1. Customer enters their credit account information.
2. System sends payment authorization request to an external
Payment Authorization Service System, and requests payment
approval.
3. System receives payment approval and signals approval to
Cashier.
4. …
 Extensions:
2a. System detects failure to collaborate with external system:
1. System signals error to Cashier.
2. Cashier asks Customer for alternate payment.
 …
When to Use Include Relationship?
 Use include when you are repeating yourself in
two or more separate use cases and you want to
avoid repetition.
 A use case is very complex and long, and
separating it into subunits aids comprehension.
ReportEmergency
FieldOfficer
Help
≪extend≫
≪Extend≫ Association for Use Cases
 Problem:
 The functionality in the original problem statement needs to be
extended.
 Solution:
 An extend association from Use Case B to Use Case A indicates that B
is an extension of A.
 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
 Note: In an extend association, the base use case can be executed without
the use case extension
A
B
Base Use
Case
≪Extend≫ Association for Use Cases
 The idea is to create an extending or addition
use case, and within it, describe where and
under what condition it extends the behavior of
some base use case.
Example: Extend Relationship
____Process Sale___
Extension Points:
Payment
VIP Customer
Handle gift certificate
payment
≪Extend≫
Payment, if
customer presents a
gift certificate
UML Notation:
1. The extending use
case points to the
base use case.
2. The condition and the
extension point can be
shown on the line.
Example: Extend Relationship
UC1: Process Sale (the base use case)
 …
 Extension Points: VIP Customer, step 1.
Payment, step 7.
 Main Success Scenario:
1. Customer arrives at a POS checkout with goods and/or
services to purchase
.…
7. Customer pays and System handles payment
.…
Example: Extend Relationship cont…
UC15: Handle Gift Certificate Payment (the extending use case)
 …
 Trigger: Customer wants to pay with gift certificate.
 Extension Points: Payment in Process Sale.
 Level: Sub-function
 Main Success Scenario:
1. Customer gives gift certificate to Cashier.
2. Cashier enters gift certificate ID.
 …
ValidateUser
CheckPassword
CheckFingerprint
Parent
Case
Child
Use Case
Generalization Association in Use Cases
 Problem
 You have common behavior among use cases and want to factor this
out.
 Solution
 The generalization association among use cases factors out common
behavior. The child use cases inherit the behavior and meaning of the
parent use case and add or override some behavior.
 Example
 Consider the use case “ValidateUser”, responsible for verifying the
identity of the user. The customer might require two realizations:
“CheckPassword” and “CheckFingerprint”

More Related Content

What's hot

state modeling In UML
state modeling In UMLstate modeling In UML
state modeling In UML
Kumar
 
Use case Diagram
Use case Diagram Use case Diagram
Use case Diagram
Rahul Pola
 
Use case Diagram
Use case DiagramUse case Diagram
Use case Diagram
Preeti Mishra
 
State chart diagram
State chart diagramState chart diagram
State chart diagram
Preeti Mishra
 
State Diagrams
State DiagramsState Diagrams
State Diagrams
Vaidik Trivedi
 
Object Oriented Analysis and Design
Object Oriented Analysis and DesignObject Oriented Analysis and Design
Object Oriented Analysis and DesignHaitham El-Ghareeb
 
Object oriented methodologies
Object oriented methodologiesObject oriented methodologies
Object oriented methodologiesnaina-rani
 
Collaboration diagram- UML diagram
Collaboration diagram- UML diagram Collaboration diagram- UML diagram
Collaboration diagram- UML diagram
Ramakant Soni
 
Object modeling
Object modelingObject modeling
Object modeling
Preeti Mishra
 
Overview of UML Diagrams
Overview of UML DiagramsOverview of UML Diagrams
Overview of UML Diagrams
Manish Kumar
 
Unit 4 designing classes
Unit 4  designing classesUnit 4  designing classes
Unit 4 designing classesgopal10scs185
 
SE_Lec 05_System Modelling and Context Model
SE_Lec 05_System Modelling and Context ModelSE_Lec 05_System Modelling and Context Model
SE_Lec 05_System Modelling and Context Model
Amr E. Mohamed
 
Identifying classes and objects ooad
Identifying classes and objects ooadIdentifying classes and objects ooad
Identifying classes and objects ooad
Melba Rosalind
 
Domain Modeling
Domain ModelingDomain Modeling
Domain Modeling
Harsh Jegadeesan
 
State Machine Diagram
State Machine DiagramState Machine Diagram
State Machine DiagramNiloy Rocker
 
Requirement Analysis
Requirement AnalysisRequirement Analysis
Requirement Analysis
SADEED AMEEN
 
Class diagram presentation
Class diagram presentationClass diagram presentation
Class diagram presentation
SayedFarhan110
 

What's hot (20)

state modeling In UML
state modeling In UMLstate modeling In UML
state modeling In UML
 
Use case Diagram
Use case Diagram Use case Diagram
Use case Diagram
 
Use case Diagram
Use case DiagramUse case Diagram
Use case Diagram
 
State chart diagram
State chart diagramState chart diagram
State chart diagram
 
State Diagrams
State DiagramsState Diagrams
State Diagrams
 
Object Oriented Analysis and Design
Object Oriented Analysis and DesignObject Oriented Analysis and Design
Object Oriented Analysis and Design
 
Object oriented methodologies
Object oriented methodologiesObject oriented methodologies
Object oriented methodologies
 
Collaboration diagram- UML diagram
Collaboration diagram- UML diagram Collaboration diagram- UML diagram
Collaboration diagram- UML diagram
 
Object modeling
Object modelingObject modeling
Object modeling
 
Overview of UML Diagrams
Overview of UML DiagramsOverview of UML Diagrams
Overview of UML Diagrams
 
Unit 4 designing classes
Unit 4  designing classesUnit 4  designing classes
Unit 4 designing classes
 
Uml class-diagram
Uml class-diagramUml class-diagram
Uml class-diagram
 
SE_Lec 05_System Modelling and Context Model
SE_Lec 05_System Modelling and Context ModelSE_Lec 05_System Modelling and Context Model
SE_Lec 05_System Modelling and Context Model
 
Usecase Presentation
Usecase PresentationUsecase Presentation
Usecase Presentation
 
Identifying classes and objects ooad
Identifying classes and objects ooadIdentifying classes and objects ooad
Identifying classes and objects ooad
 
Domain Modeling
Domain ModelingDomain Modeling
Domain Modeling
 
Ooad
OoadOoad
Ooad
 
State Machine Diagram
State Machine DiagramState Machine Diagram
State Machine Diagram
 
Requirement Analysis
Requirement AnalysisRequirement Analysis
Requirement Analysis
 
Class diagram presentation
Class diagram presentationClass diagram presentation
Class diagram presentation
 

Similar to Lecture7 use case modeling

Use case modeling
Use case modelingUse case modeling
Use case modeling
Wajahat Hasnain
 
OOAD U1.pptx
OOAD U1.pptxOOAD U1.pptx
OOAD U1.pptx
anguraju1
 
SE_Lec 08_UML Use Cases
SE_Lec 08_UML Use CasesSE_Lec 08_UML Use Cases
SE_Lec 08_UML Use Cases
Amr E. Mohamed
 
Refining The System Definition
Refining The System DefinitionRefining The System Definition
Refining The System DefinitionSandeep Ganji
 
use_case+use_case description.pptx
use_case+use_case description.pptxuse_case+use_case description.pptx
use_case+use_case description.pptx
AqeelAbbas94
 
conversion-gate02.pptx
conversion-gate02.pptxconversion-gate02.pptx
conversion-gate02.pptx
NouraBaccar1
 
Day01 01 software requirement concepts
Day01 01 software requirement conceptsDay01 01 software requirement concepts
Day01 01 software requirement concepts
Namtướcbóngđêm Virut
 
Use case Modeling
Use case ModelingUse case Modeling
Use case Modeling
Md. Shafiuzzaman Hira
 
Chapter 3.pptx
Chapter 3.pptxChapter 3.pptx
Chapter 3.pptx
Tekle12
 
Splunk | Use Case Training
Splunk | Use Case TrainingSplunk | Use Case Training
Splunk | Use Case TrainingBeth Goldman
 
Software Requirements Engineering Methodologies
Software Requirements Engineering MethodologiesSoftware Requirements Engineering Methodologies
Software Requirements Engineering MethodologiesKiran Munir
 
Requirements Are Optional, Right?
Requirements Are Optional, Right?Requirements Are Optional, Right?
Requirements Are Optional, Right?
thomstrat
 
Lesson02_Use Case Diagrams
Lesson02_Use Case DiagramsLesson02_Use Case Diagrams
Lesson02_Use Case Diagrams
Marwa Ali Eissa
 
Use Case UML Diagram
Use Case UML DiagramUse Case UML Diagram
Use Case UML Diagram
University of Texas at Dallas
 
Use case 1 User LoginActor Admin, Faculty, or StudentBa.docx
Use case 1 User LoginActor Admin, Faculty, or StudentBa.docxUse case 1 User LoginActor Admin, Faculty, or StudentBa.docx
Use case 1 User LoginActor Admin, Faculty, or StudentBa.docx
jessiehampson
 
Design Implementation ProposalDesign Implementation Proposal.docx
Design Implementation ProposalDesign Implementation Proposal.docxDesign Implementation ProposalDesign Implementation Proposal.docx
Design Implementation ProposalDesign Implementation Proposal.docx
theodorelove43763
 

Similar to Lecture7 use case modeling (20)

Use case modeling
Use case modelingUse case modeling
Use case modeling
 
Defining The System
Defining The SystemDefining The System
Defining The System
 
OOAD U1.pptx
OOAD U1.pptxOOAD U1.pptx
OOAD U1.pptx
 
chapter_5_5.ppt
chapter_5_5.pptchapter_5_5.ppt
chapter_5_5.ppt
 
SE_Lec 08_UML Use Cases
SE_Lec 08_UML Use CasesSE_Lec 08_UML Use Cases
SE_Lec 08_UML Use Cases
 
Refining The System Definition
Refining The System DefinitionRefining The System Definition
Refining The System Definition
 
use_case+use_case description.pptx
use_case+use_case description.pptxuse_case+use_case description.pptx
use_case+use_case description.pptx
 
conversion-gate02.pptx
conversion-gate02.pptxconversion-gate02.pptx
conversion-gate02.pptx
 
Day01 01 software requirement concepts
Day01 01 software requirement conceptsDay01 01 software requirement concepts
Day01 01 software requirement concepts
 
Jar chapter 3
Jar chapter 3Jar chapter 3
Jar chapter 3
 
Use case Modeling
Use case ModelingUse case Modeling
Use case Modeling
 
Chapter 3.pptx
Chapter 3.pptxChapter 3.pptx
Chapter 3.pptx
 
Splunk | Use Case Training
Splunk | Use Case TrainingSplunk | Use Case Training
Splunk | Use Case Training
 
Software Requirements Engineering Methodologies
Software Requirements Engineering MethodologiesSoftware Requirements Engineering Methodologies
Software Requirements Engineering Methodologies
 
Requirements Are Optional, Right?
Requirements Are Optional, Right?Requirements Are Optional, Right?
Requirements Are Optional, Right?
 
Lesson02_Use Case Diagrams
Lesson02_Use Case DiagramsLesson02_Use Case Diagrams
Lesson02_Use Case Diagrams
 
Use Case UML Diagram
Use Case UML DiagramUse Case UML Diagram
Use Case UML Diagram
 
Usecase
UsecaseUsecase
Usecase
 
Use case 1 User LoginActor Admin, Faculty, or StudentBa.docx
Use case 1 User LoginActor Admin, Faculty, or StudentBa.docxUse case 1 User LoginActor Admin, Faculty, or StudentBa.docx
Use case 1 User LoginActor Admin, Faculty, or StudentBa.docx
 
Design Implementation ProposalDesign Implementation Proposal.docx
Design Implementation ProposalDesign Implementation Proposal.docxDesign Implementation ProposalDesign Implementation Proposal.docx
Design Implementation ProposalDesign Implementation Proposal.docx
 

More from Shahid Riaz

Shimla deputation (1906)
Shimla deputation (1906)Shimla deputation (1906)
Shimla deputation (1906)
Shahid Riaz
 
#Syed ahmad shaheed barailvi
#Syed ahmad shaheed barailvi#Syed ahmad shaheed barailvi
#Syed ahmad shaheed barailvi
Shahid Riaz
 
How to program in c++ with 100 examples
How to program in c++ with 100 examples  How to program in c++ with 100 examples
How to program in c++ with 100 examples
Shahid Riaz
 
Virtual private networks in theory and practice
Virtual private networks in theory and practiceVirtual private networks in theory and practice
Virtual private networks in theory and practice
Shahid Riaz
 
Database systems administration week 1
Database systems administration week 1Database systems administration week 1
Database systems administration week 1
Shahid Riaz
 
Database systems administration traning 02
Database systems administration traning 02Database systems administration traning 02
Database systems administration traning 02
Shahid Riaz
 
Database systems administration traning 02
Database systems administration traning 02Database systems administration traning 02
Database systems administration traning 02
Shahid Riaz
 
Database systems administration traning 01
Database systems administration traning 01Database systems administration traning 01
Database systems administration traning 01
Shahid Riaz
 
Database systems administration traning 0
Database systems administration traning 0Database systems administration traning 0
Database systems administration traning 0
Shahid Riaz
 
Database systems administration traning 04
Database systems administration traning  04Database systems administration traning  04
Database systems administration traning 04
Shahid Riaz
 
Managing people and organizing team
Managing people and organizing teamManaging people and organizing team
Managing people and organizing team
Shahid Riaz
 
Lec 1 intro to internet
Lec 1 intro to internetLec 1 intro to internet
Lec 1 intro to internet
Shahid Riaz
 
Course guidlines course book it 3548
Course guidlines course book it 3548Course guidlines course book it 3548
Course guidlines course book it 3548
Shahid Riaz
 
Lecture12 software design class diagram
Lecture12 software design class diagramLecture12 software design class diagram
Lecture12 software design class diagram
Shahid Riaz
 
Lecture11 use case sequence diagram
Lecture11 use case sequence diagramLecture11 use case sequence diagram
Lecture11 use case sequence diagram
Shahid Riaz
 
Lecture10 use case model operation contracts
Lecture10 use case model operation contractsLecture10 use case model operation contracts
Lecture10 use case model operation contracts
Shahid Riaz
 
Lecture9 domain model visualizing
Lecture9 domain model visualizingLecture9 domain model visualizing
Lecture9 domain model visualizing
Shahid Riaz
 
Lecture8 system sequence
Lecture8 system sequenceLecture8 system sequence
Lecture8 system sequence
Shahid Riaz
 
Lecture6 activity diagrams
Lecture6 activity diagramsLecture6 activity diagrams
Lecture6 activity diagrams
Shahid Riaz
 
Lecture 5 defining the system
Lecture 5 defining the systemLecture 5 defining the system
Lecture 5 defining the system
Shahid Riaz
 

More from Shahid Riaz (20)

Shimla deputation (1906)
Shimla deputation (1906)Shimla deputation (1906)
Shimla deputation (1906)
 
#Syed ahmad shaheed barailvi
#Syed ahmad shaheed barailvi#Syed ahmad shaheed barailvi
#Syed ahmad shaheed barailvi
 
How to program in c++ with 100 examples
How to program in c++ with 100 examples  How to program in c++ with 100 examples
How to program in c++ with 100 examples
 
Virtual private networks in theory and practice
Virtual private networks in theory and practiceVirtual private networks in theory and practice
Virtual private networks in theory and practice
 
Database systems administration week 1
Database systems administration week 1Database systems administration week 1
Database systems administration week 1
 
Database systems administration traning 02
Database systems administration traning 02Database systems administration traning 02
Database systems administration traning 02
 
Database systems administration traning 02
Database systems administration traning 02Database systems administration traning 02
Database systems administration traning 02
 
Database systems administration traning 01
Database systems administration traning 01Database systems administration traning 01
Database systems administration traning 01
 
Database systems administration traning 0
Database systems administration traning 0Database systems administration traning 0
Database systems administration traning 0
 
Database systems administration traning 04
Database systems administration traning  04Database systems administration traning  04
Database systems administration traning 04
 
Managing people and organizing team
Managing people and organizing teamManaging people and organizing team
Managing people and organizing team
 
Lec 1 intro to internet
Lec 1 intro to internetLec 1 intro to internet
Lec 1 intro to internet
 
Course guidlines course book it 3548
Course guidlines course book it 3548Course guidlines course book it 3548
Course guidlines course book it 3548
 
Lecture12 software design class diagram
Lecture12 software design class diagramLecture12 software design class diagram
Lecture12 software design class diagram
 
Lecture11 use case sequence diagram
Lecture11 use case sequence diagramLecture11 use case sequence diagram
Lecture11 use case sequence diagram
 
Lecture10 use case model operation contracts
Lecture10 use case model operation contractsLecture10 use case model operation contracts
Lecture10 use case model operation contracts
 
Lecture9 domain model visualizing
Lecture9 domain model visualizingLecture9 domain model visualizing
Lecture9 domain model visualizing
 
Lecture8 system sequence
Lecture8 system sequenceLecture8 system sequence
Lecture8 system sequence
 
Lecture6 activity diagrams
Lecture6 activity diagramsLecture6 activity diagrams
Lecture6 activity diagrams
 
Lecture 5 defining the system
Lecture 5 defining the systemLecture 5 defining the system
Lecture 5 defining the system
 

Recently uploaded

Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
Ortus Solutions, Corp
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
vrstrong314
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
e20449
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 

Recently uploaded (20)

Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 

Lecture7 use case modeling

  • 2. What is a Use Case?  Narrative descriptions of domain processes in a structured prose format  They are stories or scenarios of how people use the system
  • 3. Case Study – The NextGen POS System  Computerized application used to record sales and handle payments  Used in retail store  It includes hardware and software It also interfaces to other applications, such as a third- party tax calculator and inventory control  Multiple and varied clients-side terminals and interfaces  Commercial POS
  • 4. Use Case, Actor, and Scenario  Actors  Something with behavior such as person, computer system, or organization  Scenario  It is a specific sequence of actions and interactions between actors and the system. It is also called use case instance  It is one particular story of using a system  E.g. scenario of successfully purchasing items with cash or scenario of failing to purchase items because of credit payment denial  Use case then is a collection of success and failure scenarios  Use cases are requirements, primarily functional.
  • 5. Use Case, Actor, and Scenario  A UC is a dialogue between an Actor and a system that accomplishes a task.  The dialogue is presented as a sequence of steps  A complete sequence of steps is a use case scenario
  • 6. Use Case, Actor, and Scenario UC can contain multiple scenarios Can range from simple (brief summary) to elaborate (detailed steps using adopted document template) UCs are NOT object-oriented artifacts! They feed into other OO models
  • 7. Use Cases  Kinds of Actors Primary actor has user goals fulfilled through using services of the SuD Why identify? To find user goals, which drive the use cases. Supporting actor provides a service (for example, information) to the SuD Why identify? To clarify external interfaces and protocols. Offstage actor has an interest in the behavior of the use case Why identify? To ensure that all necessary interests are identified and satisfied.
  • 8. Use Cases Guidelines How to find use cases 1.Choose the system boundary 2.Find primary actors 3.Identify goals for each primary actor 4.Define Use cases that satisfy user goals
  • 9. 1. System Boundary Goal: Process sales Cashier Customer POS System Checkout Service Goal: Buy items Enterprise Selling Things Sales Tax Agency Goal: Collect taxes on sales Sales Activity System Goal: Analyze sales and performance data
  • 10. 2 and 3. Primary actors and Goals  Brainstorm the primary actors first.  Questions to help identify Actors and Goals Who starts and stops the system? Who does user and security management? Who does system administration? Is “Time” an actor because the system does something in response to a time event? Are there any external software system that call upon the services of the system?  Organize the actors and goals in an Actor Goal List
  • 11.
  • 12. NextGen POS Manage Users . . . Cashier System Administrator actor use case communicationsystem boundary Payment Authorization Service «actor» Tax Calculator «actor» Accounting System alternate notation for a computer system actor «actor» HR System Cash In «actor» Sales Activity System Manage Security Analyze Activity Customer Manager Process Sale Handle Returns 4. Define Use cases for user goals
  • 13. NextGen Process Sale . . . Cashier Show computer system actors with an alternate notation to human actors. primary actors on the left supporting actors on the right For a use case context diagram, limit the use cases to user-goal level use cases. «actor» Payment Authorization Service
  • 14. Alternate Actor Notation NextGen Process Sale «system» Payment Authorization Service ... «actor» Payment Authorization Service Some UML alternatives to illustrate external actors that are other computer systems. The class box style can be used for any actor, computer or human. Using it for computer actors provides visual distinction. Payment Authorization Service
  • 15. Writing Use Cases  Use cases are text documents, not diagrams and use case modeling is primarily an act of writing text, not drawing diagrams.  Use Case Style Black Box Use cases  Focus on what not how  Use Case Formats Brief Casual Fully dressed
  • 16. Black Box Use cases
  • 19. Fully dressed Use case Section Comment Use case name Start with a verb Scope The system under design Level “user goal” or “sub function” Primary Actor Calls on system to deliver its services Stakeholders and interests who cares about the system and what do they want Preconditions what must be true on start Success Guarantee What must be true on successful completion Main Success Scenario Unconditional happy path scenario of success Extensions Alternate scenario of success or failure Special Requirements Related NFRs Technology and Data variation list Varying I/O methods Frequency of occurrence Influences investigation, testing Miscellaneous Open issues
  • 20. Process Sale Use Case  UC: Process Sale 1. User selects new sale option 2. System requests item identifier 3. User enters item identifier 4. System records sale of item, and 5. System displays item description, price, current total Steps 2-5 repeated until user finished 6. User selects sale finished option 7. System displays total and taxes due 8. User selects payment option 9. System requests payment information 10. User enters payment information 11. System handles payment 12. System logs completed sale and sends sale information to Accounting System and Inventory System 13. System generates receipt
  • 21. What Tests Can Help in Finding Useful Use Cases?  The Boss Test  The EBP Test: A task performed by 1 user in 1 place at 1 time in response to a business event, that adds measurable value to the business and leaves data in a consistent state.  The Size Test  Examples: Applying the tests  Negotiate the supplier contract: could be modeled as business use case  Handle returns: OK with boss. Seems like an EBP  Login: boss not happy if this is all you do all day!  Move a piece on game board: Single step, Fails the size test
  • 22. Library Use Case Diagram  A computerized library system for a university keeps track of all books and periodicals in the library and their check-out status.  Checkout and return are automated through a bar code reader (an external device).  The library system also interfaces with an external relational database which stores information about the library users (students, faculty, and staff), including whether they have any library items checked out.  Library users can access the catalog and recall books and periodicals.  Library employees have the same access as well as additional capabilities (e.g., listing the status of an item).  Note: the library catalog is part of the library computer system so it is not shown as an actor. EmployeeLogin LibEmployee CheckAvailability LibUser Recall CheckOut BarCodeReader CheckIn UsersDB
  • 23. Use Case for Employee Login 1. Employee initiates use case by entering user name 2. System prompts for password 3. If password is valid, employee is logged on and now has access to employee commands  Starting and Ending Conditions?  Exceptions? e.g., cannot find the employee login EmployeeLogin LibEmployee CheckAvailability LibUser Recall CheckOut BarCodeReader CheckIn UsersDB
  • 24. Use Case for Check Book Availability 1. User/Employee initiates use case by selecting the check book availability option 2. System prompts for choice of search by title, author, or call number 3. User makes selection and enters title, author or call number 4. System performs search through the library catalog database 5. If a match is found, system displays item status (not checked out, checked out and due date, overdue)  Starting and Ending Conditions?  Exceptions? EmployeeLogin LibEmployee CheckAvailability LibUser Recall CheckOut BarCodeReader CheckIn UsersDB
  • 25. Terminology: Concrete, Abstract, Base, and Addition Use Cases  Concrete use case  is initiated by an actor  is an EBP use case  e.g., Process Sale  Abstract use case  is never instantiated by itself  is a sub-function use case (part of another use case)  e.g., Handle Credit Payment  Base use case  that includes another use case, or that is extended or specialized by another use case  e.g., Process Sale with respect to the included Handle Credit Payment  Addition use case  that is an inclusion, extension, or specialization  Handle Credit Payment in the include relationship to Process Sale  Addition use cases are usually abstract  Base use cases are usually concrete
  • 26. Use Case Associations Use case association = relationship between use cases Important types: Include A use case uses another use case (functional decomposition and reuse of existing functionality) Extends A use case extends another use case Generalization A use case has different specializations
  • 27. ≪Include≫: Functional Decomposition  Problem:  A function in the original problem statement is too complex to be solvable immediately  Solution:  Describe the function as the aggregation of a set of simpler functions. The associated use case is decomposed into smaller use cases CreateDocument Scan OCR Check ≪include≫ ≪include≫ ≪include≫
  • 28. ≪Include≫: Reuse of Existing Functionality  Problem:  There are already existing functions. How can we reuse them?  Solution:  The include association from Use Case A to Use Case B indicates that an instance of A performs all the behavior described in B (“A delegates to B”)  Example:  The use case “ViewMap” describes behavior that can be used by the use case “OpenIncident” (“ViewMap” is factored out)  Note: The base use case cannot exist alone. It is always called with the supplier use case ViewMap OpenIncident AllocateResources ≪include≫ Base Use Case Supplier Use Case ≪include≫
  • 29. Example: Include Relationship UC1: Process Sale  …  Main Success Scenario: 1. Customer arrives at a POS checkout with goods and/or services to purchase .… 7. Customer pays and System handles payment. …  Extensions: 7b. Paying by credit: Include Handle Credit Payment. 7c. Paying by cash: Include Handle Cash Payment. …
  • 30. Example: Include Relationship cont… UC12: Handle Credit Payment  …  Level: Sub-function  Main Success Scenario: 1. Customer enters their credit account information. 2. System sends payment authorization request to an external Payment Authorization Service System, and requests payment approval. 3. System receives payment approval and signals approval to Cashier. 4. …  Extensions: 2a. System detects failure to collaborate with external system: 1. System signals error to Cashier. 2. Cashier asks Customer for alternate payment.  …
  • 31. When to Use Include Relationship?  Use include when you are repeating yourself in two or more separate use cases and you want to avoid repetition.  A use case is very complex and long, and separating it into subunits aids comprehension.
  • 32. ReportEmergency FieldOfficer Help ≪extend≫ ≪Extend≫ Association for Use Cases  Problem:  The functionality in the original problem statement needs to be extended.  Solution:  An extend association from Use Case B to Use Case A indicates that B is an extension of A.  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  Note: In an extend association, the base use case can be executed without the use case extension A B Base Use Case
  • 33. ≪Extend≫ Association for Use Cases  The idea is to create an extending or addition use case, and within it, describe where and under what condition it extends the behavior of some base use case.
  • 34. Example: Extend Relationship ____Process Sale___ Extension Points: Payment VIP Customer Handle gift certificate payment ≪Extend≫ Payment, if customer presents a gift certificate UML Notation: 1. The extending use case points to the base use case. 2. The condition and the extension point can be shown on the line.
  • 35. Example: Extend Relationship UC1: Process Sale (the base use case)  …  Extension Points: VIP Customer, step 1. Payment, step 7.  Main Success Scenario: 1. Customer arrives at a POS checkout with goods and/or services to purchase .… 7. Customer pays and System handles payment .…
  • 36. Example: Extend Relationship cont… UC15: Handle Gift Certificate Payment (the extending use case)  …  Trigger: Customer wants to pay with gift certificate.  Extension Points: Payment in Process Sale.  Level: Sub-function  Main Success Scenario: 1. Customer gives gift certificate to Cashier. 2. Cashier enters gift certificate ID.  …
  • 37. ValidateUser CheckPassword CheckFingerprint Parent Case Child Use Case Generalization Association in Use Cases  Problem  You have common behavior among use cases and want to factor this out.  Solution  The generalization association among use cases factors out common behavior. The child use cases inherit the behavior and meaning of the parent use case and add or override some behavior.  Example  Consider the use case “ValidateUser”, responsible for verifying the identity of the user. The customer might require two realizations: “CheckPassword” and “CheckFingerprint”