ATM MACHINE

ATM Machine

Develop a C-Code for the implementation of ATM machine with the following features:

  1. Have a name of your bank. Make an account of a dummy client with an initial amount of Rs.250,000 and a 4 digit PIN (5678).
  2. Your code should first of all say Welcome to the client.
  3. Your code then should ask the client to enter the 4-digit PIN. Check the PIN. If it is incorrect, ask the client again to re-enter the PIN. Allow the client to enter the PIN for maximum three times only. For 3rd incorrect entry, display the message “Your card is captured. Please contact the Bank Manager”, and the program should be terminated.
  4. If correct PIN is entered (within maximum three attempts), your code should display the following main menu.
  1.  Balance Enquiry
  2. Cash Withdrawal
  3. Cash Deposit
  4. Change PIN
  5.  Exit

DETAIL ABOUT TASK:

Ask the user to enter the one of the desired option in the main Menu.

If the client enters option 1, your code should display the current balance. After showing the balance, provide two options A and B to the user as: Press A to return to main menu or enter B to Exit. If the user enters A, main menu should be displayed while if the user enters B, the program should be terminated.

If the client enters option 2 in main menu, your code should ask the client to enter an amount (maximum Rupees 25,000), which should be multiples of Rs.500/= On having the entry of this amount, check the balance. If balance is lesser than the entered amount, display the appropriate message and then provide two options A and B to the user as: Press A to return to main menu or enter B to Exit. If the user enters A, main menu should be displayed while if the user enters B, the program should be terminated. If balance is more than the entered amount, then update the balance according to the amount entered, and display the message “Please take your amount”, display the current balance and “Do you want more Withdrawal Transaction? Press Y for Yes or N for No”. If Yes, ask the user to enter the amount to withdraw and then follow the same procedure. If No, provide two options A and B to the user as: Press A to return to main menu or enter B to Exit. If the user enters A, main menu should be displayed while if the user enters B, the program should be terminated

If the client enters option 3 in main menu, your code should ask the client to enter an amount which should be multiples of Rs.500/= (maximum Rs.90000/ per transaction.), On having the entry of this amount check that is it in the maximum limit of 90000? If no, display the appropriate message. If yes, then update the balance according to this amount, and display the message “Your amount has been deposited”, display the current balance and “Do you want more Deposit Transactions? Press Y for Yes or N for No”. If Yes, ask the user to enter the amount to deposit and then follow the same procedure. If No, provide two options A and B to the user as: Press A to return to main menu or enter B to Exit. If the user enters A, main menu should be displayed while if the user enters B, the program should be terminated.

If the client enters option 4 in the main menu, ask to enter the old PIN, then ask to enter the new PIN twice. Compare these two times entered PINS. If not same, display the appropriate message. If same then update the PIN in your program. From next time, this PIN only should be valid. Then provide two options A and B to the user as: Press A to return to main menu or enter B to Exit. If the user enters A, main menu should be displayed while if the user enters B, the program should be terminated

If client enters option 5, your code then should display the message. “Thanks, Allah Hafiz, Please Take Your Card”., then your program should be terminated.


1 Comments

Post a Comment