Question: Java Programming Minilab FileIO Write a mainline named MinilabFileIO to input a series of doubles from a file, add them together, and then output the
Java Programming
Minilab FileIO
Write a mainline named MinilabFileIO to input a series of doubles from a file, add them together, and then output the results to a file. The input file additionInput.txt looks like this:
13+26.5
27.2+3.14
101.01+11.11
57.6+1.77
The output file additionOutput.txt looks like this:
13.0+26.5=39.5
27.2+3.14=30.34
101.01+11.11=112.12
57.6+1.77=59.370000000000005
You will need to skip the blank lines in the input file. The two numbers on each line are separated by a + (You may need to double-escape the plus-sign using \\+). Convert the text numbers to doubles and add them together. Do not worry about the number of decimal places in the sum. Send the results to the output file:
You will also need to handle a possible exception.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
