Write a C++ program that simulates banking transactions for a checking account. The main program should read from the data file account.txt the initial balance in the checking account. The main...

Write a C++ program that simulates banking transactions for a checking account. The main program should read from the data file account.txt the initial balance in the checking account. The main program should read from the data file transactions.txt a list of the user’s deposits and withdrawals for the month. Each line in the data file contains a D for a deposit or a W for withdrawal and the transaction amount to be deposited or withdrawn. The number of lines in the data file is unknown. The program should contain the following two functions. void MakeWithdrawal(float, float&) void MakeDeposit(float, float&) As mentioned above, the main program reads the data from the data file. Whenever a D is read from the data file, the MakeDeposit function should be called. The amount of the deposit and the balance should be passed as arguments to the function. The amount is passed as a value parameter and the balance should be passed as a reference parameter between the function and the main program. The MakeDeposit function should add the deposit amount to the balance. After the transaction, the main program should print to the data file statement.txt a message showing the amount of the deposit, and the balance after the deposit. Whenever a W is read from the data file, the MakeWithdrawal function should be called. The amount of the withdrawal and the balance should be passed as arguments to the function. The balance should be passed as a reference parameter between the function and the main program and the withdrawal amount as a value parameter. The MakeWithdrawal function subtracts the withdrawal amount from the balance. If the balance is below $0.00, the function should also subtract an additional $30 fee. After the transaction, the main program should print to the data file statement.txt a message showing the amount of the withdrawal and balance after the withdrawal. The program should continue until there is no more data in the file. After all data has been read, the main program should print to the data file statement.txt the number of transactions the user had for the month and the ending balance in the checking account. Place 500.00 in the data file account.txt. Use the file below for the transactions.txt file. Use the file below for the newhires. txt . transactions.txt contain D 75.50 D 12.24 D 78.25 W 100.00 W 20.00 W 12.21 W 376.30 D 78.00 D 100.50 W 500.75 W 200.50 D 222.00 D 12.00 W 15.00 D 9.99 D 12.00 W 178.00 D 100.50 W 300.25 D 250.00 D 73.50 newhires.txt contain Sam Smith James Lee Jay Li Lisa Lu Heather Jones Michael Jamison Todd Bacon Thomas Brady Sue Jay Shaun Thomas Sydney WAlker Amos Walker Sam Cook
May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here