You are on page 1of 3

DATA FLOW DIAGRAMS - EXERCISE

Withdrawal of Cash from an Automatic Teller Machine


An ATM Withdrawal
To start an operation, a card is inserted in the slot, and the PIN (personal identification
number) is entered. The ATM reads information from the card, in particular, the card number
and the expiry date, and accepts the PIN from the keyboard input. The card is verified for
expiry date, and then if valid, the card number and the PIN are sent to the bank for card
validation by communication circuit. The bank either sends confirmation or refusal.
If confirmation is received, the user is invited to enter a transaction type. Assuming that the
transaction is a withdrawal of cash, one more validation is performed to check that the
amount nominated is below or equal to the daily limit for withdrawals of $1000, that the users
weekly withdrawals do not exceed the weekly limit of $5000, and that the account balance is
in credit to cover the withdrawal. If all these are OK the card is returned, the money is
dispensed and the withdrawal receipt is printed, with the date, account number, withdrawal
amount and account balance. The banks account records are updated to reflect the
transaction.
If the card has expired or is invalid, the card is retained and the user is invited to contact their
bank. If wrong PIN is entered three (3) times the card is returned and the transaction is
cancelled. If the amount entered exceeds the users account balance, or the daily or weekly
limits, the user is asked to change the amount up to three (3) times or cancel the transaction.
If a valid transaction amount has not been entered by the third attempt, the card is returned
and the transaction is cancelled.

For the educator


This is a useful exercise because understand the process flow as they have all used an ATM
machine. This makes the analysis easy and encourages discussion. The exercise highlights
what DFDs are NOT designed to do. DFDs do not model the order or dependency of events.
For example, from the users perspective the number of attempts needed to enter the correct
PIN is critical, but there is no mechanism for this to be made apparent via this kind of system
model.
The problem domain provides sufficient detail for the DFD to be developed to level 2.
State any assumptions
It is important that all assumptions about the system are discussed and clarified. Without a
clear definition of assumptions it will be impossible to evaluate the level of understanding that
students have gained when looking at their solutions.
With a relatively complex scenario such as this, it is sometimes valuable for students to
produce first-cut versions singly or in pairs. Group discussion may then be used to define a
common set of assumptions. Students should then try to complete their DFD on their own.
When a process is complex (as in Level 3) it should be broken to the next level. It is important
that the number of incoming and outgoing flows provided in the Level 1 diagram for process
no.3 is exactly the same in the level 2 diagram for that process.

www.webworkforce.org

SOLUTION
Level 0 DFD (Context Diagram) ATM Cash Withdrawal
Invalid
Card

Card
Details

Invalid
PIN
User

ATM
Withdrawal
System

PIN

User
Overdraw
details

Transaction
Amount

Receipt

Level 1 DFD ATM Cash Withdrawal


Card
Details
Card Type
Details

PIN

1.
VERIFY
CARD

Invalid
card

Invalid PIN

Transaction
amount

Overdraw
details

Valid
Card
Details

Card num,
PIN
Card
status
2.
VERIFY
PIN

Card status
3.
VALIDATE
AMOUNT

Validated
Transaction
Details

ACCOUNTS

Account
Balance

Weekly
Balance
Daily
Balance

Receipt

Transaction
details

4.
TRANSACT
WITHDRAWAL

www.webworkforce.org

CARDS

Level 2 DFD ATM Cash Withdrawal (Validate Amount)

Transaction
amount

Card
status
Transaction
details
3.1
ACCEPT
AMOUNT

Daily limit
exceeded

Overdraw
details
3.4
NOTIFY
INVALID
AMOUNT

Weekly limit
exceeded

Daily
balance
3.2
CHECK
DAILY
LIMIT

ACCOUNTS

Daily
total
OK
3.3
CHECK
WEEKLY
LIMIT
Weekly
total OK

Insufficient
funds

3.5
CHECK
ACCOUNT
BALANCE
Validated
transaction
details

www.webworkforce.org

Weekly
balance

Account
balance

You might also like