Write Requirements

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Write requirements (in structured form) for the following

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.

Description Computes the charge for the specified gas amount.

Inputs Specified amount of fuel required, credit card information.

Source User interface system on gas tank, credit card reader.

Outputs Gas, amount to be charged (receipt).

Destination Customer’s car, customer's bank.

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.

Function Dispense correct amount of cash.

Description Verifies the cardholder's pin number and dispenses the amount of cash
desired.

Inputs Amount of cash desired, debit card number, pin number.

Source User interface, debit card reader, pin pad.

Outputs Cash, receipt, debit card.

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.

Post condition Amount of cash in ATM must be subtracted, transaction must be


recorded.

3. The spelling-check and correcting function in a word processor.

Function Correct all the Spellings.

Description Check and correct all misspells.

Inputs Data (text) user wanted to check.

Source By typing through keyboard, copied text.

Outputs All mistakes and misspells are corrected.

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

Post condition The user have option to save corrected data.

You might also like