dfd example 2 atm

Upload: blake-thompson

Post on 14-Apr-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/27/2019 Dfd Example 2 Atm

    1/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 identificationnumber) is entered. The ATM reads information from the card, in particular, the card numberand the expiry date, and accepts the PIN from the keyboard input. The card is verified forexpiry date, and then if valid, the card number and the PIN are sent to the bank for cardvalidation 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 thetransaction is a withdrawal of cash, one more validation is performed to check that theamount 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 isin credit to cover the withdrawal. If all these are OK the card is returned, the money isdispensed and the withdrawal receipt is printed, with the date, account number, withdrawalamount and account balance. The banks account records are updated to reflect thetransaction.

    If the card has expired or is invalid, the card is retained and the user is invited to contact theirbank. If wrong PIN is entered three (3) times the card is returned and the transaction iscancelled. If the amount entered exceeds the users account balance, or the daily or weeklylimits, 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 returnedand the transaction is cancelled.

    For the educator

    This is a useful exercise because understand the process flow as they have all used an ATMmachine. This makes the analysis easy and encourages discussion. The exercise highlightswhat 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 correctPIN is critical, but there is no mechanism for this to be made apparent via this kind of systemmodel.

    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 aclear definition of assumptions it will be impossible to evaluate the level of understanding thatstudents have gained when looking at their solutions.

    With a relatively complex scenario such as this, it is sometimes valuable for students toproduce first-cut versions singly or in pairs. Group discussion may then be used to define acommon 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 importantthat the number of incoming and outgoing flows provided in the Level 1 diagram for processno.3 is exactly the same in the level 2 diagram for that process.

    www.webworkforce.org 1

  • 7/27/2019 Dfd Example 2 Atm

    2/3

    SOLUTIONLevel 0 DFD (Context Diagram) ATM Cash Withdrawal

    ATMWithdrawal

    System

    User User

    CardDetails

    InvalidCard

    InvalidPIN

    PIN

    Overdraw

    details

    Transaction

    Amount

    Receipt

    Level 1 DFD ATM Cash Withdrawal

    1.VERIFYCARD

    CardDetails

    2.VERIFY

    PIN

    ValidCardDetails

    Invalidcard

    Card num,PIN

    Cardstatus

    3.VALIDATEAMOUNT

    ACCOUNTS

    CARDS

    DailyBalance

    Card status

    Invalid PIN

    Transactionamount

    Overdrawdetails

    4.TRANSACT

    WITHDRAWAL

    PIN

    Transaction

    details

    ValidatedTransaction

    Details

    Receipt

    Card TypeDetails

    WeeklyBalance

    Account

    Balance

    www.webworkforce.org 2

  • 7/27/2019 Dfd Example 2 Atm

    3/3

    Level 2 DFD ATM Cash Withdrawal (Validate Amount)

    3.1ACCEPTAMOUNT

    3.2CHECKDAILYLIMIT

    Transactionamount

    ACCOUNTS

    Cardstatus

    3.3CHECK

    WEEKLYLIMIT

    Transactiondetails

    Dailybalance

    DailytotalOK

    Weeklybalance

    3.4NOTIFYINVALID

    AMOUNT

    Daily limitexceededOverdraw

    details

    Weekly limitexceeded

    3.5CHECK

    ACCOUNTBALANCE

    Accountbalance

    Insufficientfunds

    Weeklytotal OK

    Validatedtransaction

    details

    www.webworkforce.org 3