use cases l.
Skip this Video
Loading SlideShow in 5 Seconds..
Use-Cases PowerPoint Presentation
Download Presentation

Loading in 2 Seconds...

play fullscreen
1 / 27

Use-Cases - PowerPoint PPT Presentation

  • Uploaded on

Use-Cases. Outline. Introduction Use Case Diagrams Writing Use Cases. Register User. Use Cases. Illustration. A use case is a contract of an interaction between the system and an actor. A full use-case model comprise of: A diagram, describing relations between use-cases and actors.

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'Use-Cases' - Jims

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
  • Introduction
  • Use Case Diagrams
  • Writing Use Cases
use cases3

Register User

Use Cases


  • A use case is a contract of an interaction between the system and an actor.
  • A full use-case model comprise of:
    • A diagram, describing relations between use-cases and actors.
    • A document describing the use case in details


Use Case in script

Use case in diagram

use case diagram objective
Use Case Diagram Objective
  • Create a semi-formal model of the functional requirements
  • Analyze and define:
    • Scope
    • External interfaces
    • Scenarios and reactions
  • Introduction
  • Use Case Diagrams
  • Writing Use Cases
  • Guidelines for Effective Use Cases
what s in a use case model

Use Case


What’s in a Use Case Model?

Use Case


Use Case

Defines a sequence of actionsperformed by a system that yields an observable result of value to the actor


Someone or something outside the system acting in a role that interacts with the system. Could be a human or another system.


A Simple Example




Use Case

System boundary

use case model identify

Submit Timesheet





Project Manager

Use Case Model: Identify

Example use case:

Name: Submit Timesheet

Brief Description: The consultant enters details of the number of hours worked and the activities worked on, then confirms and submits the timesheet.

Each Actor and Use Case needs a brief description.


Briefly state its role, goals and responsibilities in relation to the system.

Use Case

Briefly summarise what takes place in the use case, giving an indication of its scope.

Example actor:

Name: Consultant

Brief Description: The consultant updates their daily timesheet and expense information and gets status reports.

  • Use Case Name
  • The name should be:
  • Brief
  • Unique
  • Written as an active verb
  • Meaningful
  • You should be able to tell what the actor wants to achieve in the use case from its name.

Project Accounting

linking use cases
Linking Use-Cases
  • Three mechanism are used:
    • Include
    • Extend
    • Inheritance
use case levels
Use-Case Levels

Base Use Case: Used directly by the user

Perform Sale

User goals


Fill-in billing info

Choose Products

Alistair Cockburn “Writing Effective Use Cases”

the include construct

Perform Sale

Fill-in billing info

The “Include” Construct
  • Include is used when:
    • Decomposing complicated behavior
    • Centralizing common behavior
  • The base use case explicitly incorporates the behavior of another use case at a location specified in the base.



extend graphical representation

Gift wrap Products

Extend – Graphical Representation
  • The base use case can incorporate another use case at certain points, called extension points.
  • Note the direction of the arrow
    • The base use-case does not know which use-case extends it



Product is a gift

Perform Sale

After checkout

example amazon
Example: Amazon

Shopping Cart

Product Page

Review Writing

example cont d
Example – cont’d

Rank Supplier


Search Product

View Product Details


Write Review

After page generation


Navigate Deals


Add to cart





user is not

a member



Handle Order Status


  • Introduction
  • Use Case Diagrams
  • Writing Use Cases
  • Guidelines for Effective Use Cases
structure of a use case specification
Structure of a Use Case Specification





Post conditions

Success Scenario

Alternatives flows

  • What starts the use-case?
  • Examples:
    • Customer reports a claim
    • Customer inserts card
    • System clock is 10:00pm
  • What the system needs to be true before running the use-case.
  • Examples
    • User account exists
    • User has enough money in her account
    • There is enough disk space
post conditions
  • A post-condition is the outcome of the use-case.
  • Examples
    • Money was transferred to the user account
    • User is logged in
    • The file is saved to the hard-disk
success scenario
Success Scenario
  • The success scenario is the main story-line of the use-case
  • It is written under the assumption that everything is okay, no errors or problems occur, and it leads directly to the desired outcome of the use-case
  • It is composed of a sequence of action steps
  • Example:

Interaction step

  • Administrator enters course name, code and description
  • System validates course code
  • System adds the course to the db and shows a confirmation message

Validation Step

Internal Change Step

(plus) Interaction Step

use cases common mistakes
Use-Cases – Common Mistakes
  • Complex diagram
  • No system
  • No actor
  • Too many user interface details
    • “User types ID and password, clicks OK or hits Enter”
  • Very low goal details
    • User provides name
    • User provides address
    • User provides telephone number
alternative flows
Alternative Flows

Starting points



  • Used to describe exceptional functionality
  • Examples:
    • Errors
    • Unusual or rare cases
    • Failures
    • Starting points
    • Endpoints
    • Shortcuts




alternative flows example
Alternative Flows - Example
  • Errors:
    • “Case did not eject properly”
    • “Any network error occurred during steps 4-7”
    • “Any type of error occurred”
  • Unusual or rare cases
    • “Credit card is defined as stolen”
    • “User selects to add a new word to the dictionary”
  • Endpoints
    • “The system detects no more open issues”
  • Shortcuts:
    • “The user can leave the use-case by clicking on the “esc” key
  • I am the manager of a theatre.
  • I want to create an automated movie ticket machine.
  • You are analysts who need to describe what the customer wants as a set of use cases
  • Simplifying assumptions:
    • One movie showing at a time
    • Movie time is same every day, only one time, same price
    • Only manager can change/add movie
    • Customer can only buy tickets
  • Who or what are the actors?
  • What are the use cases (goals of actors)?
use case diagram for movie ticket machine
Use case diagramfor Movie Ticket Machine
  • Why are there three Actors?
  • Why three use cases for Customer?
  • Which use cases look easy to write?
use cases for manager
Use cases for Manager

Use case: Set title

Actors: Manager, Machine

1. Manager requests a change of movie title

2. Machine asks manager for new movie title

3. Manager enters movie title

Use case: Set price

Actors: Manager, Machine

1. Manager requests a change of ticket price

2. Machine asks manager for new price for movie title

3. Manager enters ticket price

Alternatives: Invalid price

If manager enters price below $1 or greater than $10

3a. Machine asks manager to reenter price

Use case: Set seats

Actors: Manager, Machine

1. Manager requests a change in number of seats

2. Machine asks manager for number of seats in theatre

3. Manager enters number of seats

Alternatives: Invalid number of seats

If manager enters number less than 20 or greater than 999

3a. Machine asks manager to reenter number of seats

use cases for customer
Use cases for Customer

Use case: Buy tickets

Actors: Customer, Machine

1. Customer requests tickets

2. Machine tells customer to put balance due in money slot

3. Customer enters money in money slot

4. Machine updates customer balance

5. Customer requests tickets

6. Machine prints tickets

7. Machine updates number of seats

Alternative: Insufficient seats

At step 1, if number of tickets requested is less than available seats,

1a. Display message and end use case

Alternative: Insufficient funds

At step 5, if money entered < total cost,

5a. Display insufficient amount entered

5b. Go to step 3

Use case: # of tickets

Actors: Customer, Machine

1. Customer enters number of tickets

2. Machine displays total balance due

Alternative: Customer wants zero tickets

At step 1, customer enters zero tickets

1a. Display thank you message

1b. Set balance to $0.0

Use case: Return change to customer

Actors: Customer, Machine

1. Customer requests change

2. Machine dispenses money

3. Machine updates customer balance