Check02E (TS = 20)

Download the jar file typex.jar (the file has been updated on October 1, 9:15pm) and save it in the same directory as type.jar. typex.jar should already be part of your CLASSPATH.

Study the API of the class Statistics. You will have to use this class in your program.

Create the program named Check02E that prompts the user to enters doubles separated by whitespace (space or tab). You may assume that the user enters at least one and at most 20 doubles and that all doubles are greater than or equal to 0 and smaller than 100. Using the Statistics class, compute the minimum, maximum, mean, median and standard deviation. Print the results as in the following three sample runs. The input provided by the user is typeset in boldface.

Enter one or more doubles separated by whitespace.
0 1 2

Minimum:             0.00
Maximum:             2.00
Mean:                1.00
Median:              1.00
Standard deviation:  0.82
Enter one or more doubles separated by whitespace.
2.3      6     1.16

Minimum:             1.16
Maximum:             6.00
Mean:                3.15
Median:              2.30
Standard deviation:  2.07
Enter one or more doubles separated by whitespace.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

Minimum:             1.00
Maximum:             20.00
Mean:                10.50
Median:              10.50
Standard deviation:  5.77

To check whether your code is correct, you can use eCheck. You are advised to use the offline mode first. Once your code is correct (worth 3 marks) and you are happy with your style (worth 2 marks), you can switch to the online mode and submit your solution. For style, you should adhere to the code conventions described in Appendix C of the textbook.