Question: C. Assignment: Based on the material covered in class on I/O files, and the material in your text, do the following: 1. Write a C++

C. Assignment: Based on the material covered in class on I/O files, and the material in your text, do the following: 1. Write a C++ program that prints the opening balance of a checking account followed by the closing balance of the checking account. a. The input data file contains the opening balance as the first data value, followed by an unknown number of individual transactions. b. A negative number represents a withdrawal, and a positive number represents a deposit. c. For example, if the input is: 324.56 420.32 -3.54 -87.56 0.0 d. Sample output is: * THE MCC BANK STATEMENT * ---------------------------------------------------------- Opening Balance = 324.56 ---------------------------------------------------------- New Balance Deposit = 420.32 744.88 Withdrawal = 3.54 741.34 Withdrawal = 87.56 653.78 ---------------------------------------------------------- Closing Balance = 653.78 ---------------------------------------------------------- There are 3 transactions in this statement. e. The last line of the output containing total number of transactions has to be counted from with the program to determine the total number of transactions in the statement. 2. Save the program as lab5acct.cpp . 3. Create an input file called lab5chek.dat a. Have your program read the input from the file and process the data until end of file. 4. Write the output to an output file, call it lab5acct.rpt i. The input data file is as follows: 1224.56 420.32 -3.54 -87.56 500.00 -87.25 225.75 -72.72 -33.67 -100.10 50.50 -99.99 -19.99 0.0 D. Test Data: Calculate what the ending balance and total number of transactions should be before you execute the program. E. For this program, hand in: 1. A copy of the source code 2. A print out of the input file 3. A print out of the output file.

please follow instruction

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!