Hi guys, I have to write a program that does the following:
Write a program that reads data from an input file named “input.txt”, and produces two output files named “report.txt” and “error.txt”. The input file contains data needed to generate a report of electric customers’ bills. The report will be the first output file. The second output file will be an error file.
The input file will be laid out with the following information, each on a separate line:
1. Customer First Name
2. Customer Last Name
3. Old Meter Reading
4. New Meter Reading
The following are the reasons that a customer should be written to the error file:
1. A meter reading not valid number in range 0 – 9999
2. A name left blank
The report file should be laid out, neatly arranged in columns, with the following:
Last Name, First Name Amount Owed
Note: each unit costs 20 cents
The error file should be laid out, neatly arranged in columns, with the following:
Last Name, First Name Old Meter New Meter