Assignment Description:
In this assignment you will create a program that allows a user to choose one of the following main menu items:
C) Create a bank account by supplying a user id and password.
L) Login using their id and password.
Q) Quit the program.
If User enters an option other than (uppercase or lowercase) C, L, or Q, the program does not do anything and shows a message wrong option and displays the menu again.
When user enters option C, the program asks the user to enter a user ID and a password and successfully returns back to the main menu. The login and password should be stored in a file.
If the user chooses option L, the program will display the login prompt and then, it will ask for the password. At this stage, the entered login and password are compared to the stored login/password pair and proper message will show up if the
match was not found which takes the user back to the main menu.
Now, if login was successful, the following banking menu will be display to let the user choose one of the following tasks:
W) Withdraw money.
D) Deposit money.
B) Request balance.
Q) Quit the program.
(again, remember that if the user enters an option other than (uppercase or lowercase) W, D, B, Q, the program should show a message and display the menu again.)
The initial balance for the user account should be $0.00
If the user chooses option W, the program should ask the user to enter amount user wishes to withdraw.
Validation: In the case of withdraw, if the amount is more than balance the user should be notified and no withdraw will occur.
If the user chooses option D, the program should ask the user how much amount the user wishes to deposit and add it to initial balance.
If the user chooses option B, the program should display the balance amount in the user account.
Sample Output:
Hi! Welcome to Future Computer Programmer ATM Machine! Please select an option from the menu below:
l -> Login
c -> Create New Account
q -> Quit
Enter your choice: L
Please enter your user id: 12 Please enter your password 2345
No match was found! Login Failed !
Please select an option from the menu below: l -> Login
c -> Create New Account
q -> Quit
Enter your choice: c
Please enter your user name: 12 Please enter your password: 2345
Thank You! Your account has been created!
Please select an option from the menu below: l -> Login
c -> Create New Account
q -> Quit
Enter your choice: l
Please enter your user id: 12 Please enter your password: 2345
Access Granted!
Please select an option from the menu below
d -> Deposit Money
w -> Withdraw Money
r -> Request Balance
q -> Quit Enter your choice: d
Enter amount of deposit: $20 $20 was deposited.
Please select an option from the menu below d -> Deposit Money
w -> Withdraw Money
r -> Request Balance
q -> Quit
Enter your choice: R Your balance is $20.
Please select an option from the menu below d -> Deposit Money
w -> Withdraw Money
r -> Request Balance
q -> Quit
Enter your choice: W
Enter amount of withdrawal: $25
Sorry withdrawal amount exceeds the balance. Can’t withdraw !
Please select an option from the menu below
d -> Deposit Money
w -> Withdraw Money r -> Request Balance q -> Quit
Enter your choice: W
Enter amount of withdrawal: $2.5
Please select an option from the menu below d -> Deposit Money
w -> Withdraw Money
r -> Request Balance
q -> Quit
Enter your choice: r Your balance is $17.5.
Please select an option from the menu below d -> Deposit Money
w -> Withdraw Money
r -> Request Balance
q -> Quit Enter your choice: Q Thanks for stopping by!
Additional Instructions: Please make sure your code has following functions:
1. mainMenu(): Function to display the main menu for login, create account, and quit.
2. createAccount(): Function that accepts user ID and password to create the account.
3. login(): Function to match user ID and password to indicate if login is successful or not.
4. bankingMenu(): Function to display the menu choices for Deposit, Withdrawal, Balance and Quit.
5. deposit (): Function to accept the amount user wishes to deposit in his/her account.
6. withdraw(): Function to accept the amount user wishes to withdraw from the account.
7. displayBalance(): Function to display the balance amount in the user account. You can use additional functions (optional) for input validation and withdrawal amount validation. Your program should make use appropriate switch and if-else statements where necessary.
This is not a homework site. We won't do your homework for you. However we are always willing to help solve problems you encountered, correct mistakes you made in your code and answer your questions.
We didn't see your attempts to solve this problem yourself and so we cannot correct mistakes you didn't made and answer questions you didn't ask. To get help you should do something yourself and get real problems with something. If your problem is "I don't understand a thing", then you should go back to basics and study again. As it is impossible to find derivative of function without knowledge in arithmetic, you cannot do more complex tasks in programming without clear understanding of basics
Seems like you need to use conditional if statements with simple yes or no, and if these conditions are met do this. Also, youtube loan programs there are numerous tutorials that will show you step by step with detailed explanations on how to do make the "loan" style program after you make the conditionals.