Question: Hi Team, Could you please help me with this assignment. Develop ONE c++ program with the following functions. Use onlinegdb c++ as the compiler. Read

Hi Team,

Could you please help me with this assignment.

Develop ONE c++ program with the following functions. Use onlinegdb c++ as the compiler. Read the questions carefully. Your answer should address each and every point of this assignment precisely.

Assume you design this program for the ATM of Bank of Alcorn.

1. Function menu( ). This function DOES NOT return anything. It simply display a menu:

1. Deposit

2. Widthdraw

3. Balance

4. Exit

2. A function login( ). The function returns true or false. The function asks the user to enter user name and password. If the user enters Alcorn as the username and CS527 as the password, the function returns true. Otherwise, it displays "Username and password do not match." and return false.

3. A function deposit( ). It takes two double parameters: balance and newdeposit. The function will return balance + newdepoit.

4. A function widthdraw( ). It takes two double parameters: balance and takeout. The functionwill return balance - takeout.

5. Your main( ) function.

5a. When your main( ) starts, make a double variable mybalance. Put 5000 in mybalance as the initial value.

5b. Call login( ) function. Keep running login( ) function until the login( ) returns true -- user successfully logs in.

5c. Display the menu by calling the menu( ) function. After showing the menu, ask the user to enter a choice (1,2,3 or 4).

5d. Ask the user to enter the deposit amount and call the deposit( ) function to get the balance and display a message "Your deposit is completed. " if the user selects 1. Note: deposit( ) returns a value. The return value should be the new balance for deposit.

5e. Ask the user to enter the widthdraw amount and call the widthdraw( ) function and if the user selects 2. The return value should be the new balance for widthdraw if the return value is not a negative number. In this case, the program should display "Your widthdraw is completed. Please take cash." IF the return value is negative, the balance should not be changed, and the program should display "Not enough fund for the requested transaction.".

5f. Simply display "The balance is ..." if the user selects 3.

5g. If the user selectes 1, 2, or 3, after the action, go back to step 5c to wait for the next transaction from the user. Stop the program when the user selects 4.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!