Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask C/C++ Expert


Home >> C/C++

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.

• You will need a file to hold the login/password and another file to store the transaction information similar to the information shown on the screen.

• Make sure you work out an algorithm and submit it as well either in the form of pseudo-code or flowchart before you start implementing the code. You can include your pseudo code within the block comment/header documentation part of the code. A pseudo code/algorithm should consist of clear and concise steps that mirror your implementation logic.

C/C++, Programming

  • Category:- C/C++
  • Reference No.:- M91548300
  • Price:- $80

Priced at Now at $80, Verified Solution

Have any Question?


Related Questions in C/C++

Why do researcher drop the ewaste and where does it end

Why do researcher drop the ewaste and where does it end up?

Question 1find the minimum and maximum of a list of numbers

Question: 1. Find the Minimum and Maximum of a List of Numbers: 10 points File: find_min_max.cpp Write a program that reads some number of integers from the user and finds the minimum and maximum numbers in this list. Th ...

There are several ways to calculate the pulse width of a

There are several ways to calculate the pulse width of a digital input signal. One method is to directly read the input pin and another method (more efficient) is to use a timer and pin change interrupt. Function startTi ...

Project - space race part a console Project - Space Race Part A: Console Implementation

Project - Space Race Part A: Console Implementation INTRODUCTION This assignment aims to give you a real problem-solving experience, similar to what you might encounter in the workplace. You have been hired to complete a ...

Software development fundamentals assignment 1 -details amp

Software Development Fundamentals Assignment 1 - Details & Problems - In this assignment, you are required to answer the short questions, identify error in the code, give output of the code and develop three C# Console P ...

What are the legal requirements with which websites must

What are the legal requirements with which websites must comply in order to meet the needs of persons with disabilities? Why is maximizing accessibility important to everyone?

Assignment word matchingwhats a six-letter word that has an

Assignment: Word Matching What's a six-letter word that has an e as its first, third, and fifth letter? Can you find an anagram of pine grave. Or how about a word that starts and ends with ant (other than ant itself, of ...

Assign ment - genetic algorithmin this assignment you will

ASSIGN MENT - GENETIC ALGORITHM In this assignment, you will use your C programming skills to build a simple Genetic Algorithm. DESCRIPTION OF THE PROGRAM - CORE REQUIREMENTS - REQ1: Command-line arguments The user of yo ...

1 implement the binary search tree bst in c using the node

1. Implement the Binary Search Tree (BST) in C++, using the Node class template provided below. Please read the provided helper methods in class BST, especially for deleteValue(), make sure you get a fully understanding ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As