CS 491 Class Notes - PowerPoint PPT Presentation

1 / 15
About This Presentation
Title:

CS 491 Class Notes

Description:

The amount is then inserted into the cash sucker. ... If the Customer fails to insert the indicated amount into the cash sucker within ... – PowerPoint PPT presentation

Number of Views:34
Avg rating:3.0/5.0
Slides: 16
Provided by: allensp
Category:
Tags: class | notes | sucker

less

Transcript and Presenter's Notes

Title: CS 491 Class Notes


1
CS 491 Class Notes
  • October 25, 1999

2
Announcements
  • Reviews
  • Class schedule for the rest of semester
  • Updated project specification

3
Use Cases
  • Organize your functional requirements into
    discrete events
  • Elements
  • Actors (entities outside the system stickmen)
  • Use cases (represented as ovals)
  • Relationships (between actors or between use
    cases)

4
A Simple Use Case
Withdraw money
Deposit money
Customer
Balance Inquiry
Simple ATM Machine
5
Withdraw Money
  • Main flow of events The use case starts when the
    system prompts the Customer for a PIN number.
    The Customer can now enter a PIN number via the
    keypad. The Customer commits the entry by
    pressing the Enter button. The system then
    checks this PIN number to see if it is valid. If
    the PIN number is valid, the system asks the
    Customer to select a transaction type from the
    following set Withdraw Money, Deposit Money,
    Balance Inquiry. The Customer selects Withdraw
    Money. The system responds by asking for the
    amount to be withdrawn. The customer types an
    amount. The amount is then dispensed through the
    cash dispenser and the use case terminates at
    that point
  • Exceptional flow of events The Customer can
    cancel a transaction at any time by pressing the
    Cancel button, thus restarting the use case. No
    changes are made to the Customers account.

6
Withdraw Money (cont.)
  • Exceptional flow of events The Customer can
    clear a PIN number anytime before committing it
    and reenter a new PIN number.
  • Exceptional flow of events If the Customer
    enters an invalid PIN number, the use case
    restarts. If this happens three times in a row,
    the system cancels the entire transaction,
    preventing the Customer from interacting with the
    ATM for 60 seconds.
  • Exceptional flow of events If the Customer
    enters an amount to withdraw that makes the total
    withdrawals for the last 24 hours above 300, the
    Customer is told that 300 is the maximum daily
    limit for withdrawals. The Customer is
    reprompted to enter an amount to withdraw and the
    use case resumes from that point.

7
Deposit Money
  • Main flow of events The use case starts when the
    system prompts the Customer for a PIN number.
    The Customer can now enter a PIN number via the
    keypad. The Customer commits the entry by
    pressing the Enter button. The system then
    checks this PIN number to see if it is valid. If
    the PIN number is valid, the system asks the
    Customer to select a transaction type from the
    following set Withdraw Money, Deposit Money,
    Balance Inquiry. The Customer selects Deposit
    Money. The system responds by asking for the
    amount to be deposited. The Customer types an
    amount. The amount is then inserted into the
    cash sucker. The system then produces a message
    that the amount was properly credited to the
    Customers account and the use case terminates at
    that point.
  • Exceptional flow of events The Customer can
    cancel a transaction at any time by pressing the
    Cancel button, thus restarting the use case. No
    changes are made to the Customers account.

8
Deposit Money (cont.)
  • Exceptional flow of events The Customer can
    clear a PIN number anytime before committing it
    and reenter a new PIN number.
  • Exceptional flow of events If the Customer
    enters an invalid PIN number, the use case
    restarts. If this happens three times in a row,
    the system cancels the entire transaction,
    preventing the Customer from interacting with the
    ATM for 60 seconds.
  • Exceptional flow of events If the Customer fails
    to insert the indicated amount into the cash
    sucker within 30 seconds, all money is returned
    to the customer with a message that the correct
    amount was not inserted. The Customer is
    reprompted for an amount to insert and the use
    case resumes at that point.

9
Balance Inquiry
  • Main flow of events The use case starts when the
    system prompts the Customer for a PIN number.
    The Customer can now enter a PIN number via the
    keypad. The Customer commits the entry by
    pressing the Enter button. The system then
    checks this PIN number to see if it is valid. If
    the PIN number is valid, the system asks the
    Customer to select a transaction type from the
    following set Withdraw Money, Deposit Money,
    Balance Inquiry. The Customer selects Balance
    Inquiry. The system responds by producing the
    Customers balance on the screen, and the use
    case terminates at that point.
  • Exceptional flow of events The Customer can
    cancel a transaction at any time by pressing the
    Cancel button, thus restarting the use case. No
    changes are made to the Customers account.

10
Balance Inquiry (cont.)
  • Exceptional flow of events The Customer can
    clear a PIN number anytime before committing it
    and reenter a new PIN number.
  • Exceptional flow of events If the Customer
    enters an invalid PIN number, the use case
    restarts. If this happens three times in a row,
    the system cancels the entire transaction,
    preventing the Customer from interacting with the
    ATM for 60 seconds.

11
Commonality Between Use Cases
  • All of three of these use cases shared major
    commonality
  • This commonality could be viewed as activity
    devoted to validating the customers identity.
  • This customer identity validation can form a new
    use case.

12
New Use Case
Withdraw money
Customer validation
ltltincludegtgt
ltltincludegtgt
Deposit money
Customer
ltltincludegtgt
Balance Inquiry
Simple ATM Machine
13
Customer Validation
  • Main flow of events The use case starts when the
    system prompts the Customer for a PIN number.
    The Customer can now enter a PIN number via the
    keypad. The Customer commits the entry by
    pressing the Enter button. The system then
    checks this PIN number to see if it is valid. If
    the PIN number is valid, the use case is
    terminated.
  • Exceptional flow of events The Customer can
    cancel a transaction at any time by pressing the
    Cancel button, thus restarting the use case. No
    changes are made to the Customers account.
  • Exceptional flow of events The Customer can
    clear a PIN number anytime before committing it
    and reenter a new PIN number.
  • Exceptional flow of events If the Customer
    enters an invalid PIN number, the use case
    restarts. If this happens three times in a row,
    the system cancels the entire transaction,
    preventing the Customer from interacting with the
    ATM for 60 seconds.

14
Withdraw Money
  • Main flow of events Include(Validate Customer).
    If the PIN number is valid, the system asks the
    Customer to select a transaction type from the
    following set Withdraw Money, Deposit Money,
    Balance Inquiry. The Customer selects Withdraw
    Money. The system responds by asking for the
    amount to be withdrawn. The customer types an
    amount. The amount is then dispensed through the
    cash dispenser and the use case terminates at
    that point
  • Exceptional flow of events The Customer can
    cancel a transaction at any time by pressing the
    Cancel button, thus restarting the use case. No
    changes are made to the Customers account.
  • Exceptional flow of events If the Customer
    enters an amount to withdraw that makes the total
    withdrawals for the last 24 hours above 300, the
    Customer is told that 300 is the maximum daily
    limit for withdrawals. The Customer is
    reprompted to enter an amount to withdraw and the
    use case resumes from that point.

15
Other Use Case Issues
  • Use cases let you organize functionality around
    discrete events, but
  • Life is rarely this simple.
  • English notation tends to be a bit ambiguous.
    Alternatives for specifying behavior
  • Sequencing diagrams
  • State diagrams
  • These alternatives can be addenda to English
    descriptions
Write a Comment
User Comments (0)
About PowerShow.com