subject

Objective To learn how to use Java Collections. To use enhanced for loops on Java Collections. Assignment In this assignment you will write a program to average a list of grades in a file called ""input. txt"". This file could contain any number of grades. You should then print the mean of the grades and their standard deviation. You can find the standard deviation by taking the square of the difference between the grade and the mean of the grades (called its variance). You take the mean of these variances and then take its square root to find the standard deviation. You cannot compute the standard deviation as the grades are entered, but rather you must store the grades and compute their mean and standard deviation after all the grades have been input. Implementation You will want to use the Java methodMath. sqrt in this assignment. You will want to use the wrapper class Integer in declaring Collections and in enhanced for loops. Sample Input File 3 10 19 4 Sample Output The average grade is 9.0 The standard deviation is : 6.363961030678928

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:50
Write a car class having two private member variables called tank and speed. write public methods called pumpgas and gofast. the method pumpgas gets an integer for gas that must be pumped. that value needs to be added to tank (no more than 20 gallons). it must return the amount of gas that is purchased ($4 per gallon). the method gofast should increase the speed by 5 each time it is called.write a constructor for the above class that initialized both variables to zero.write a tostring to display both the tank and speed when the car is printed.modify the car class to implement the interface comparable and an interface called carinter having the public methods in carinter.write the main program to create an array of size 5 of type car. create 5 car objects having each location of the array to refer to one of the cars. test the pumpgas, gofast, equals method on the array items. write an enhanced loop to print all the car values (using a tostring written last time).write a generic method to find the minimum of four items. pass int, double, char, string and car objects to test this method.
Answers: 1
question
Computers and Technology, 23.06.2019 15:20
In a game with three frames, where will the objects on layer 1 appear? a. next to the play area b. in the middle of the game c. behind everything else d. in front of everything else
Answers: 1
question
Computers and Technology, 23.06.2019 20:00
How much current flows through the alternator brushes? a. 2–5 a b. 25–35 a, depending on the vehicle c. 5–10 a d. 10–15 a
Answers: 2
question
Computers and Technology, 24.06.2019 02:10
Consider the usual algorithm to convert an infix expression to a postfix expression. suppose that you have read 10 input characters during a conversion and that the stack now contains these symbols: (5 points) | | | + | | ( | bottom |_*_| now, suppose that you read and process the 11th symbol of the input. draw the stack for the case where the 11th symbol is
Answers: 2
You know the right answer?
Objective To learn how to use Java Collections. To use enhanced for loops on Java Collections. Assig...
Questions
question
Mathematics, 17.02.2021 22:40
question
Arts, 17.02.2021 22:40
Questions on the website: 13722363