Public double statsscanner scanner given a scanner of


public double[] stats(Scanner scanner) Given a Scanner of double values, return an array of capacity three that has the maximum value in the Scanner as the value in result[0], the minimum value as the second value in result[1], and the average as the third value in result[2]The following assertions must pass: @Test public void testStats() { Scanner scanner = new Scanner("90.0 80.0 70.0 68.0"); double[] result = myFun.stats(scanner); assertEquals(3, result.length); // The capacity is always 3 assertEquals(90.0, result[0], 0.1); // The maximum is at index 0 assertEquals(68.0, result[1], 0.1); // The minimum is at index 1 assertEquals(77.0, result[2], 0.1); // The average is at index 2 }

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Public double statsscanner scanner given a scanner of
Reference No:- TGS0569393

Expected delivery within 24 Hours