Assignment: #Stats Due: 02/24/02019 Points: 3

Specification

Copy the program Stats.java to your computer and implement the TBI (To Be Implemented) stats() and checkIfSorted() methods following the instructions given in their method comment blocks.

The program output must match the following. Note: Every output line that starts with ... is followed by a blank line. {output file}

null element

empty array

[0]
...mean: 0.0; median: 0.0; mode: 0; cardinality: 1; range: 0

[1,2]
...mean: 1.5; median: 1.5; mode: modeless; cardinality: 2; range: 1

[1,1]
...mean: 1.0; median: 1.0; mode: 1; cardinality: 2; range: 0

[1,2,3]
...mean: 2.0; median: 2.0; mode: modeless; cardinality: 3; range: 2

[5,5,5,5,5]
...mean: 5.0; median: 5.0; mode: 5; cardinality: 5; range: 0

[0,2,4,5,5,8]
...mean: 4.0; median: 4.5; mode: 5; cardinality: 6; range: 8

[1,5,6,6,6,7,9]
...mean: 5.714285714285714; median: 6.0; mode: 6; cardinality: 7; range: 8

[-7,0,0,3,3,3,4,4]
...mean: 1.25; median: 3.0; mode: 3; cardinality: 8; range: 11

[-2,-2,0,1,1,2,2,2]
...mean: 0.5; median: 1.0; mode: 2; cardinality: 8; range: 4

[-4,-2,-2,3,12,12,42]
...mean: 8.714285714285714; median: 3.0; mode: modeless; cardinality: 7; range: 46