Question: LAB: Adjust list by normalizing - methods (Interactive) When analyzing data sets, such as data for human heights or for human weights, a common step

LAB: Adjust list by normalizing - methods (Interactive) When analyzing data sets, such as data for human heights or for human weights, a common step is to adjust the data. This can be done by normalizing to values between 0 and 1, or throwing away outliers. For this program, adjust the values by dividing all of the values in the list bye the smallest value. If the smallest values is 0, leave the list unchanged. The input begins with an integer indicating the number of double values that follow.

Ex: If the input is:

How many values? S

30.0

50.0

10.0

70.0

65.0

the output is:

3.0 5.0 1.0 7.0 6.5

The main method for this program has already been written - you must define the following 2 methods to make the program work:

public static int getMinimum ( double[] values)

public static void normalize (double[] values, double smallest)

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 Programming Questions!