Cfp-Lab LAB Assignment C Code To Develop An ATM Machine
Cfp-Lab LAB Assignment C Code To Develop An ATM Machine
LAB Assignment
Develop a C-Code for the implementation of ATM machine with the following features:
1) Have a name of your bank. Create an account of dummy client with an initial amount of
Rs.100,000 and a 4 digit password (1234).
2) Your code should first of all say Welcome to the client.
3) Your code then should ask the client to enter the password. Check the password. If it is
incorrect, ask the client again to re-enter the password. Allow the client to enter the
password for maximum three times only. For 3rd incorrect entry, display the message that
your card is captured. Please contact the Bank Manager, and the program should be
terminated.
4) If correct password is entered (with maximum three attempts), your code should display
the following main menu.
1) Balance Enquiry
2) Cash Withdrawal
3) Cash Deposit
4) Change Password
5) Exit
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 20,000), which should be multiples of Rs.500/= On having the entry of
this amount, check the balance. If balance is less 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 this
amount, and display the message “Please take your amount”, display the current balance and
“Do you want more transaction? Press Y for Yes or N for No. If Yes, ask the user to enter
the amount 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/= (no maximum limit), On having the entry of this
amount, then update the balance according to this amount, and display the message “Your
amount has been deposited”, and display the current balance. 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,
If the client enters option 4 in the main menu, ask to enter the old password, then enter the
new password twice. Update the password in your program. From next time, this password
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.