Question: This is a Java lab that I am working on. I do have 2 other parts done, but the third part is giving me troubles,
Part 3: Use Eclipse to write a Java program that does the following. Name your program labljava 1. It should read integer grades from the user until the user enters the sentinel -1. As you read the grades, count them, and store them in an integer array. Assume cach grade entered is an integer in the range 0..100 and that there will be at most 100 grades entered. Hence, declare an int array named grades of size 100 2. After all the grades have been counted and entered in the array grades, do the following: (1) output the number of grades entered; (2) compute and output the mean of the grades in the array (recall that the mean is the sum of the grades divided by the number of the grades: G) compute and output the standard deviation of the grades in the array. Use the following formula to compute the standard deviation Standard deviation im0 mean where Nis the number of grades and mean is the mean of the grades Both mean and standard deviations should be floating point values. Your sample dialog with the user may like the following Please enter the grades (-1 indicates the end of input) 70 80 60 90 -1 Total number of grades is 4 The mean is 75.00 The standard deviation is 11.180339887498949
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
