Question: You need to implement a Java program that: 1. Reads input data from a file named input.txt. 2. The input.txt file contains a list of

You need to implement a Java program that: 1. Reads input data from a file named input.txt. 2. The input.txt file contains a list of integers, one per line. The list may contain duplicates and may be in any order. 3. The program should read the input data and compute the following statistics: The minimum value in the file. The maximum value in the file. The number of values in the file The average of the values in the list. 4. The program should then write the computed statistics to a file named output.txt. The file should contain one line for each statistic. Here is a sample run: TODO 1. Create a class named FileIOApp with a main method. 2. Implement the main method as follows: You are given an input file, input.txt. Read from the input.txt file using a Scanner Compute the statistics (minimum, maximum, and average). Create the output.txt file using a PrintStream Write the statistics to the file. 3. Test your program by running it and verifying that the output.txt file contains the expected results.

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!