Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Dr. Ferrol Blackmon Write a Java program called ArrayStatistics contained in 1 J

ID: 3816194 • Letter: D

Question

Dr. Ferrol Blackmon Write a Java program called ArrayStatistics contained in 1 Java source file named ArrayStatistics.java that reads a series ofmulti-dimensional arrays of doubles from an input file and prints out the statistics on each array's data to the console. The statistics that are calculated are to be the following: Max, Min, Mean, Median, Range and Standard Deviation. Your input file for this program !!MUST BE NAMED!! array input.txt This will be in the same folder as your source file. For example, if the input file contains the following. The first integer indicates the number rows of data and the second integer indicates the number of columns. In this example, there are 3 sets of data. 3.4 5.6 29.3 32.1 4.3 11.6 29.3 48.2 22.8 22.1 332.9 45.88 1.0 2.0 3.0 1.0 2.0 3.0 3.4 5.6 29.3 32.1 322.99 4.3 11.6 29.3 48.2 323.22 22.8 22.1 332.9 45.88 12.67 4.3 11.6 29.3 48.2 233.98

Explanation / Answer

Answer:

Here's the ArrayStatistics.java class:

--------------------------------------------------------------------------------------------------------------------------------------

INPUT:

array_input.txt

3 4
3.4 5.6 29.3 32.1
4.3 11.6 29.3 48.2
22.8 22.1 332.9 45.88
2 3
-1.0 -2.0 -3.0
1.0 2.0 3.0
4 5
3.4 5.6 29.3 32.1 322.99
4.3 11.6 29.3 48.2 323.22
22.8 22.1 332.9 45.88 12.67
4.3 11.6 29.3 48.2 233.98

--------------------------------------------------------------------------------------------------------------------------------------------

OUTPUT:

max: 332.90
min: 03.40
mean: 48.96
median: 26.05
range: 329.50
standard deviation: 90.67

max: 03.00
min: -03.00
mean: 00.00
median: 00.00
range: 06.00
standard deviation: 02.37

max: 332.90
min: 03.40
mean: 78.69
median: 29.30
range: 329.50
standard deviation: 117.52

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote