Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

MS Zero Semester (2021 – 2023)

Fall 2021

LAB Project ---- ATM Machine

Computer Programming and Fundamentals

(1) Project given on Dec. 16, 2021


Submission Deadline: Dec. 24, 2021 (Friday) by 3:00 pm in the folder at the link:

\\172.30.10.2\Assignments\Applied Sciences Dept\DPAM\Dr. Muhammad Yousaf


Hamza\MS\LabProject

(2) Submission Mode: Word file having your code and some snapshots of various cases.
(3) Have a title page mentioning your data (in the same order as mentioned below):
Lab Project

Department:

Name:

Global Serial Number (You will be allotted soon).

(4) Don’t take the risk of copying the assignment.


(5) The name of word file should be as the following format:
Degree_TwoDigitGlobalSr.No._Full Name_LabProject

Example: Physics_03_Full Name_ LabProject

Note: Use underscore, not dash. Use your serial number in two digits as written in the above
mentioned example.

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.400,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) Funds Transfer
5) Change PIN
6) 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 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
ask the user “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.
Note: Allow the user to have maximum 10 Withdraw Transactions with the following
conditions.
In 1st Transaction, maximum Rs.20000/=, can be withdrawn; in 2nd Transaction, maximum
Rs.15000/= can be drawn; then in each of the subsequent transaction, maximum Rs.10,000
can be drawn.

If the client enters option 3 in main menu, your code should ask the client to enter amount to
be deposited which should be multiples of Rs.500/= (maximum Rs.60,000/ per transaction.).
On having the entry of this amount check that is it in the maximum limit of 60,000? 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
ask the user “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 (maximum 60,000) 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.
Allow the user unlimited deposit transactions (with maximum Rs.60,000 per transaction).

If the client enters option 4 in the main menu, ask to enter 16-digit Account Number of
Receiver side. Assume the account number is correct. Update the balance accordingly and
display the message “Transferred Successfully”, display the current balance and ask the user
“Do you want more Funds Transfer? Press Y for Yes or N for No”. If Yes, ask the user to
enter 16-digit Account Number of Receiver side. Assume the account number is correct.
Then follow the same procedure for Funds Transfer. 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.
Note: Allow the user to have maximum 3 Funds Transfer Transactions (maximum
Rs.35,000/= per transaction.)

If the client enters option 5 in the main menu, ask to enter the old PIN, check its validity and
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 6 your code then should display the message. “Thanks, Allah Hafiz,
Please Take Your Card”, then your program should be terminated.

…………………………………….. Best Wishes …………………………………………

You might also like