HOW can i solve this program?..Write the definitions of the declared function prototypes of the given code. This program should be able to simulate ATM functionalities. For simplicity sake, this ATM can only handle one account and the initial balance will always have the same value every time the program will be executed. No medications should be done in the given codes (main function and function prototypes).

# include <iostream.h>
#include<stdlib.h>

int fSelectMenu ();
//this function will display the main menu options
//and will return a value of the selected transaction
void fDeposit(double&);
//this function will simulate deposit transaction
//this function will update the balance once a successful
//deposit transaction occured.
//this function should not allow deposit if amount to deposit is less than 100.00
void fWithdraw(double&);
//this function will simulate withdraw transaction
//balance should be updated once a succes withdraw transaction occured.
//this function should not allow withdrawal if amount to withdraw is less than 200.00
//and remaining balance will be less than 500.00
void fBalanceInquiry (double);
//this function should display the remaining balance
void fQuit( )
//this function will terminate the program using the exit pre-defined object

char fTryAgain();
//this function will ask the user if he wants to do another transaction
//this function should return a char type based on selection made by the user 
void main()
{
	double balance=10000.00;
	char ch;
	int select;
	cout.setf(ios::fixed);
	cout.setf(ios::showpoint);
cout.precision(2);
do
	{
	select = fSelectMenu ();
	
	switch (select)
	{
	case 1:
			fDeposit (balance);
			break;
	case 2:
			fWithdraw (balance);
			break;
	case 3:
			fBalanceInquiry(balance);
			break;
	case 4:
			fQuit();
	default:
			cerr<<"Invalid selection\n";
	}
	cout<<"Your remaining Balance: "
		<<balance<<endl<<endl;
	
	ch = fTryAgain ();
	}while (ch=='Y' || ch == 'y');
}

Note: you are only required to write the function definition. Thus, you are not allowed to make any modifications in the main function and on the function prototypes.

> Note: you are only required to write the function definition. Thus, you are not allowed to make
> any modifications in the main function and on the function prototypes.
So from this

> int fSelectMenu ();
Write this

int fSelectMenu () {
  return 0;
}

Now do that for all the other functions as well.

Then in a series of small steps
- read one line of the comments explaining what to do
- make the function do that thing
- test that the function does that thing
- rinse and repeat until everything is done.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.