Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

5.17 Normalize a list of real numbers When analyzing data sets, such as data for human heights or for human weights, a common step is

image text in transcribed

5.17 Normalize a list of real numbers 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. Write a program that: asks the user to enter a positive integer number of elements in a data set. If the user enters a zero or negative number, repeat the entry creates an array of real numbers (floating-point numbers), to hold as many data points as the user wants to enter, fills in the elements of the array with numbers entered by the user, computes the minimum and maximum value of the values in the array, normalizes the values in the array into the interval 0 to 1 by replacing each element val[il by (val[i] - min)/(max - min) where min is the minimum and max is the maximum value in the array. and finally prints out the whole array's values, separated by spaces, including a space after the last element. Example: If the user enters 43.0 0.0-1.0 2.0 the program outputs: 1.00.25 0.0 0.75 LAB ACTIVITY 5.17.1: Normalize a list of real numbers 0/100 Normalize.java Load default template... 1 import java.util.Scanner; mtu public class Normalize { public static void main(String [] args) { Scanner scnr = new Scanner(System.in); /* TODO */ OO

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions