Question: Do both part please 2. (AverageIO.java) Write a program that collects an input filename and an output filename. The input file contains lines with two

Do both part please
2. (AverageIO.java) Write a program that collects an input filename and an output filename. The input file contains lines with two double numbers per line separated by a ' Write the sum and average of each line in the input file to the output file. Use a Scanner to collect the filenames from the user. Test your program using numbers.txt for input. C:\Users\aaron\Desktop\>java AverageIo Enter input file name: numbers.txt Enter output file name: sum.txt Processing complete. After completion, my program produces sum.txt with contents 27.52 13.76 0.48 0.24 -17.299999999999997 29.4 14.7 2047.9 0.0011 6.57 3.285 24.660000000000004 111.86099999999999 768.0 384.0 -8.649999999999999 1023.95 5.5E-4 12.330000000000002 55. 930499999999995 Modify your program so that it can also deal with invalid data in the file. Use exceptions to respond to values that are missing or that cannot be converted to numbers by putting an appropriate message in the output file. Use moreNumbers.txt to test. Here are the contents of my output.txt file 27.52 13.76 0.48 0.24 Error converting numbers. 29.4 14.7 2047.9 0.0011 6.57 3.285 Missing column (s). 111.86099999999999 768.0 384.0 1023.95 5.5E-4 55. 930499999999995
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
