Question: Sorry for the long instructions should be written in java Part 1: Understand the algorithm Given a set ofN values (1 through aa) with mean

Sorry for the long instructions
should be written in java
Part 1: Understand the algorithm Given a set ofN values (1 through aa) with mean x-, the standard deviation is. Finding the standard deviation inolves two steps: one that computes the mean and another that computes the average of the squared differences (L.e., the variance). At the end, take the square root of the variance to determine the standard deviation Mean: 2.50 1. Compute the mean and standard deviation for the 2. Make sure you get 86.3 for the mean and 6.6 for the Part 2: Creating an 4roaylist from input values following numbers by hand: {82, 88, 97, 80, 79, 92) standard deviation. Think about the algorithm you used. StdDay 1.12 1. spragunr@25001-S java Sta Daw Create two Java classes for today's lab: StatDriver java with a main method, and Stats.java without a main method The goal of the main method is to read a series of umbers from System in, create an Anaylist containing those numbers, call the mean and standard deviation functions of the Stats class, and then report the results. 2. To start coding, first create an Arayljt of double values in your main method Mean: 2.50 3. Now, use a loop to read the input values from thse Part 3: Writing a method to calculate the mean keyboard (as doubles) and store them into the Araylit No prompt should be given before reading the values. The loop should teminate when user indicates that no more numbers will be entered by pressing CTRL-d in the terminal. 1. In the Stats java file, create a public static method called mean that will take an Alit of double values as its parameter, and then calculate and return the mean of those mumbers (which is of double datatype). The following lines of code will allow you to read the numbers from the teminal and will store it in an Aayliet named data, till user presses CTRL-d in the terminal 2. The method should ensure that the Arsyljat is not null and that it has more than 0 elements Ifeither of these conditions exists, the method should returm Double NAN (not a umber). Scanner input = new Scanner(System in); 3. Test your mean method from the StatDriver.java program The main method should output the return value as a single line, using the format "Mean: %26a" while (gut haNeyPguble0)1 Part 4: Calculating the standard deviation Note: The condiion of the while loop works for anything other tian numbers. User can eitker press corl- d or any non-numberexsA-Z) in the keyboard to stop taking input 1. Add a public static method called stdDey in Stats.java. This method should compute the standard deviation of a given Aaylit of double numbers and return that double number. 4. Once the Arayliat is built, if the user wanted to compute 2. Your dDeymethod should call the mean method created mean, you will call the appropriate method (either mean or atoDe) of Stats class and pass this viat as the argument in Part 3 above. 3- The method should ensure that the agw and that it has more than 0 elements If either of those conditions exists, retum Doyble Na mot a number). is not null 5. Here are some examples of interacting with the completed programi 4. Add to the driver program a single line of output following the mean output line. The format of the standard deviation line should be "StdDPF %.2fm" S java StatR mean
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
