Problem

Describe the algorithm used by your favorite ATM machine in dispensing cash. (You may gi...

Describe the algorithm used by your favorite ATM machine in dispensing cash. (You may give your description in either English or pseudocode, whichever you find more convenient.)

Step-by-Step Solution

Solution 1

The algorithm used by the ATM machine for dispensing cash, in English is

Step 1: Accept the card from the user

Step 2: Authenticate the user account

Step 3: Accept the withdrawal amount

Step 4: Check the account balance

Step 5: Dispense the cash if the account balance is greater than or equal to the requested amount

Step 6: Print the receipt and record the transaction.

Step 7 : If the account balance is less than the withdrawal amount, exit the transaction.


Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 1.2