Question

Java 6.16 LAB: Adjust list by normalizing

When analyzing data sets, such as data for human heights or for human weights, a common step is to adjust the data. This adjustment can be done by normalizing to values between 0 and 1, or throwing away outliers.
For this program, adjust the values by dividing all values by the largest value. The input begins with an integer indicating the number of floating-point values that follow. Assume that the list will always contain fewer than 20 floating-point values.
Output each floating-point value with two digits after the decimal point, which can be achieved as follows:
System.out.printf("%.2f", yourValue);
Ex: If the input is:
5 30.0 50.0 10.0 100.0 65.0
the output is:
0.30 0.50 0.10 1.00 0.65 

The 5 indicates that there are five floating-point values in the list, namely 30.0, 50.0, 10.0, 100.0, and 65.0. 100.0 is the largest value in the list, so each value is divided by 100.0.
For coding simplicity, follow every output value by a space, including the last one.

import java.util.Scanner; 

public class LabProgram {
   public static void main(String[] args) {
      /* Type your code here. */
   }
}


1 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 9 more requests to produce the answer.

1 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
Java 6.16 LAB: Adjust list by normalizing
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • 5.21 LAB: Adjust values in a list by normalizing

    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.Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integers that follow. Then, adjust each integer in the list by subtracting the smallest value from all the integers.Ex: If the...

  • 5.23 LAB: Adjust values in a list by normalizing When analyzing data sets, such as data...

    5.23 LAB: Adjust values in a list by normalizing 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. Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integers that follow. Then, adjust each integer in the list by...

  • in Python please 6.8 LAB: Adjust values in a list by normalizing When analyzing data sets,...

    in Python please 6.8 LAB: Adjust values in a list by normalizing 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. Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integers that follow. Then, adjust each integer in...

  • C++ Please   Adjust list by normalizing - functions & arrays No Vectors can be used since...

    C++ Please   Adjust list by normalizing - functions & arrays No Vectors can be used since we haven't learned them yet !! 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 subtracting the smallest value from all the values. The input begins with an...

  • NEED IN CORAL LANGUAGE ONLY When analyzing data sets, such as data for human heights or...

    NEED IN CORAL LANGUAGE ONLY 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 subtracting the smallest value from all the values. The input consists of five integers. Ex: If the input is 30 50 10 70 65, the output is: 20 40 0...

  • JAVA

    Write a Java class (program) which inputs a simple integer and outputs a list of values from the input variable down to 0 (not including 0). You should only show every other value in the output, starting with the input value. You must use a for loop.For example, if the input is 23, the output should be:The input value was 2323 21191715131197531Code given:import java.util.Scanner;/**  * This program counts down from the input number down to (but not including)   * 0, skipping...

  • IT Java code In Lab 8, we are going to re-write Lab 3 and add code...

    IT Java code In Lab 8, we are going to re-write Lab 3 and add code to validate user input. The Body Mass Index (BMI) is a calculation used to categorize whether a person’s weight is at a healthy level for a given height. The formula is as follows:                 bmi = kilograms / (meters2)                 where kilograms = person’s weight in kilograms, meters = person’s height in meters BMI is then categorized as follows: Classification BMI Range Underweight Less...

  • Solve it by JAVA please. Now, write a class named InputSplitter. This class will take input...

    Solve it by JAVA please. Now, write a class named InputSplitter. This class will take input from the keyboard (using a Scanner) and split the incoming tokens into integers, floating point numbers, and strings. The incoming tokens will be added to one of three accumulators which start out at zero, and which keep a running total. Thus, the class will have an accumulator for integers. It starts out with the value zero. Every time another integer is read in, it...

  • Must be done in Java. Provide the rest of the code with full comments and explanation and with proper indentation. Use...

    Must be done in Java. Provide the rest of the code with full comments and explanation and with proper indentation. Use simple methods for better understanding. Must compile. CODE PROVIDED: import java.util.ArrayList; import java.util.Scanner; public class Problem3 {    public static void main( String [] args ) {        Scanner in = new Scanner( System.in );        //PLEASE START YOUR WORK HERE        //**********************************************************                                                  //**********************************************************        // PLEASE END YOUR WORK HERE        System.out.print("END OF OUTPUT");    } } 20 points! PROBLEM 3: EXTENDED FAMILY Complete this...

  • Define a function called collapse() which takes a list as input. Each element of the list...

    Define a function called collapse() which takes a list as input. Each element of the list will either be an integer, or a list of integers. The function should modify the input list by replacing all of the elements which themselves are lists with the sum of their elements. For example: Test Result vals = [1, 2, 3, 4, 5] collapse(vals) print(vals) [1, 2, 3, 4, 5] vals = [1, [2, 3], 4, 5] collapse(vals) print(vals) [1, 5, 4, 5]...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT