Professional Documents
Culture Documents
Write Requirements
Write Requirements
Write Requirements
functions
1. An unattended petrol pump system that includes a credit card reader.
The customer swipes the card through the reader then specifies the
amount of petrol required.
Function Charge customer for amount of gas specified, dispense correct amount
of gas.
Action Customer will input the amount of gas they require, program will calculate
the charge for the amount of gas, customer will swipe credit card, gas will be put
into the car, credit card will be charged, receipt printed for customer.
Precondition Gas amount desired must be available in the gas tank, credit card
number must be verified before transaction, before gas is dispensed.
Post condition Amount taken from gas tank must be subtracted, charge must be
applied to card, specified amount of gas must be dispensed.
2. The cash-dispensing function in a bank ATM.
Description Verifies the cardholder's pin number and dispenses the amount of cash
desired.
Action User inputs debit card, user inputs pin, user selects amount of cash desired,
ATM checks if user's account has enough cash to be dispensed, ATM checks if
ATM has enough cash to be dispersed, ATM dispenses cash if these checks are
passed, user receives debit card, user receives receipt.
Precondition User must have enough money in their account, ATM must have
enough money, user's pin number must be correct.
Action User clicks on the button to run the spell check in the word processor, user
is then prompted for each error the spell check function finds and is presented with
possible fixes, user either chooses a recommended fix of the problem or chooses to
ignore the error until all errors have been accounted for.
Precondition User must input the allowed format of text, user enter the amount of
data within the limit