CASE STUDY ATM
Introduction The software to be designed will control a simulated automated teller machine (ATM) having a magnetic stripe reader for reading an ATM card, a customer console (keyboard and display) for interaction with the customer, a slot for depositing envelopes, a dispenser for cash (in multiples of 20), a printer for printing customer receipts, and a key-operated switch to allow an operator to start or stop the machine. The ATM will communicate with the bank's computer over an appropriate communication link. (The software on the latter is not part of the requirements for this problem.)
Requirements Statement
The ATM must be able to provide the following services to the customer: 1. A customer must be able to make a cash withdrawal from any suitable account linked to the card, in multiples of 20.00. Approval must be obtained from the bank before cash is dispensed. 2.
Use Cases for Example ATM System
System Startup Use Case The system is started up when the operator turns the operator switch to the "on" position. The operator will be asked to enter the amount of money currently in the cash dispenser, and a connection to the bank will be established. Then the servicing of customers can begin.
These cases represent an initial check that the functionality specified by the use cases is present
Use Case Function Being Tested Initial System State Input Expected Output System is started when System is off the switch is turned "on" System requests initial cash amount
System Startup
Activate the "on" switch
System Startup
System accepts initial cash amount
System is requesting cash Enter a legitimate amount System is on amount
System Startup
Connection to the bank is System has just been established turned on
Perform a legitimate inquiry transaction
System output should demonstrate that a connection has been established to the Bank
System Shutdown
System is shut down when System is on and not the switch is turned "off" servicing a customer
Activate the "off" switch System is off
Initial Functional Test Cases for Example ATM System
An initial reading of the use cases suggests that the following will be part of the system. A controller object representing the ATM itself (managing the boundary objects listed below.) Boundary objects representing the individual component parts of the ATM:
Operator panel. Card reader. Customer console, consisting of a display and keyboard. Network connection to the bank. Cash dispenser. Envelope acceptor. Receipt printer.
Controller objects corresponding to use cases. (Note: class
ATM can handle the Startup and Shutdown use cases itself, so these do not give rise to separate objects here.)
Session Transaction (abstract generalization, responsible for common features, with concrete specializations responsible for type-specific portions)
An entity object representing the information encoded
on the ATM card inserted by customer. An entity object representing the log of transactions maintained by the machine.
Entity Objects
Class Balances Class Card Class Message Class Receipt Class Status
diagram of analysis classes
State Charts for Example ATM System
State-Chart for One Session
State Chart for One Transaction
Session Sequence Diagram
Transaction Sequence Diagram
Transaction Collaboration Diagram
Package Diagram for Example ATM System