Professional Documents
Culture Documents
UCCD1013 Tutorial6 Ans
UCCD1013 Tutorial6 Ans
UCCD1013 Tutorial6 Ans
A suggested answer is provided below. For simplicity, this representation assumes that the
individual performs only one transaction.
----------------------------------------------------------------------------------------------------------------
Accept Personal-identification-number
PERFORM Validate Personal Identification Number Process
BEGIN IF
IF Personal-identification-number IS CORRECT
THEN PERFORM Withdrawal Process
ELSE PERFORM Unsuccessful Log-in Process
END IF
PERFORM Transaction Completion Process
RETURN
(Withdrawal Process)
ACCEPT Requested-withdrawal-amount
BEGIN IF
IF Requested-withdrawal-amount is less than OR equal to Checking-balance
THEN GIVE Requested-withdrawal-amount in cash AND SUBTRACT Requested-withdrawal-
amount from Checking-balance AND RECORD new Checking-balance
ELSE NOTIFY user that Requested-withdrawal-amount is greater than Checking-balance
END IF
RETURN
-----------------------------------------------------------------------------------------------------------------
3. An individual wishes to withdraw cash from an ATM machine. Prepare a decision table to
represent this situation. Please note any assumptions that you make.
2
Rules
Conditions/
Courses of 1 2 3
Actions
Correct User Y N Y
ID
Withdrawal < or -- >Bal
Amount = ance
Balan
ce
Give Cash X
Generate X
Receipt
Update X
Checking
Balance
End X X
Transaction
4. An individual wishes to withdraw cash from an ATM machine. Prepare a decision tree to
represent this situation. Please note any assumptions that you make.