Question: For this program you will write two methods. The first computes and returns the mean value for an array of doubles. The method header

For this program you will write two methods. The first computes and 

For this program you will write two methods. The first computes and returns the mean value for an array of doubles. The method header for this method looks like this: public static double mean(double[ ] x); The second method computes and returns the standard deviation for a sample population. The method header for this method looks like this: public static double deviation (double[ ] x); The equation for the mean: mean=(x1+x2+x3+...+xn)n The equation for the Standard Deviation: Sx = -1(xi - n-1 nThe number of data points The mean of the Xi x) X Each of the values of the data Now write a main() method that does the following: 1. Tells the use what the program does. 2. Prompts the user to enter five numbers. 3. Saves the user's input in an array of doubles. 4. Uses the methods above to compute the mean and the standard deviation for the numbers in the array. 5. Displays the mean and the standard deviation with 2 digits after the decimal point. 6. Displays a goodbye message. 7. Your file should have the proper file prologue, and each method should have the proper method prologue. The following example show you what your program should look like when it runs (user input is green): This program computes the mean and the standard deviation for a set of numbers. Enter a number: 3.5 Enter a number: 4 Enter a number: 6.1 Enter a number: 6 Enter a number: 7.5 The mean of this set of numbers is 5.42 The standard deviation is 1.65 Goodbye

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!