HW6: Chapter 4

4.5 > Using the techniques suggested here, where natural language descriptions are presented in a standard format, write plausible user requirements for the following functions:

  • An unattended petrol (gas) pump system with a credit card reader. The customer swipes the card through the reader, then specifies the amount of fuel required. The fuel is delivered and the customer's account debited.

    • 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 to card (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.

    • PostCondition > Amount taken from gas tank must be subtracted; charge must be applied to card; specified amount of gas must be dispensed.

  • 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 (via debit card input); 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.
    • PostCondition > Amount of cash in ATM must be subtracted; transaction must be recorded.
  • In an internet banking system, a facility that allows customers to transfer funds from one account held with the bank to another account with the same bank.

    • Function > Transfer specified amount of money from one bank account to another, only if accounts belong to the same bank.

    • Description > Transfers funds from one account to the other.

    • Inputs > Username; password; bank account to be transferred to; amount to transfer; submission.

    • Source > Reading of amount to be transferred; true if both accounts with the same bank.

    • Outputs > Receipt of confirmation sent to user.

    • Action > User logs onto online banking system; password is verified; user must choose to transfer funds; account to be transferred to must be declared; other account my be checked that it is with the same bank; amount to be transferred must be declared; funds must be transferred; user sent an email confirmation that the transfer went through successfully/unsuccessfully.

    • Precondition > User must log into the bank system; user must have funds to transfer; other account must belong with the same bank.

    • PostCondition > One account is subtracted from while the other is added to.

4.6 > Suggest how an engineer responsible for drawing up a system requirements specifications might keep track of the relationships between functional and non-functional requirements.

The engineer could use a table to differentiate between non-functional and functional requirements or some visual system that clearly defines the differences between the requirements. They can also keep track by using other graphical models such as a UML diagram, sequence, or state charts. Being able to visually see how different requirements affect the system as a whole will help the engineer clearly define the specifications of the project for himself, other engineers, and the client.

4.7 > Using your knowledge of how an ATM is used, develop a set of use cases that could serve as a basis for understanding the requirements for an ATM system.

  1. User inserts debit card into the ATM
  2. ATM reads card; asks for pin number.
  3. User inputs correct pin number.
  4. ATM verifies pin number; ATM asks user for what they want to use the ATM for:
    • Withdrawal OR
    • Balance check OR
    • Deposit
  5. User chooses an option.
    • User enters amount to withdraw OR
    • User asks for account balance OR
    • User inputs amount to deposit
  6. ATM
    • Checks if there are enough funds to withdraw that amount from and, if there are, releases money to user  OR
    • Prints receipt of account balance OR
    • Accepts deposit and prints receipt
  7. User receives debit card back. Transaction over.