Computers and Technology

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

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 22:30, josephmelichar777
Write a full class definition for a class named player , and containing the following members: a data member name of type string .a data member score of type int .a member function called setname that accepts a parameter and assigns it to name . the function returns no value. a member function called setscore that accepts a parameter and assigns it to score . the function returns no value. a member function called getname that accepts no parameters and returns the value of name .a member function called getscore that accepts no parameters and returns the value of score .this is what i have, aparently this is wrong: class player{private: string name; int score; public: void player: : setname (string n){name =n; }void player: : setscore (int s){score = s; }string player: : getname (){return name; }int player: : getscore (){return score; }};
Answers: 2
image
Computers and Technology, 23.06.2019 19:30, Felixthecat7186
Anul 2017 tocmai s-a încheiat, suntem trişti deoarece era număr prim, însă avem şi o veste bună, anul 2018 este produs de două numere prime, 2 şi 1009. dorel, un adevărat colecţionar de numere prime, şi-a pus întrebarea: “câte numere dintr-un interval [a, b] se pot scrie ca produs de două numere prime? “.
Answers: 3
image
Computers and Technology, 24.06.2019 02:30, journeyhile5
How to apply the fly in effect to objects on a slide
Answers: 1
image
Computers and Technology, 24.06.2019 10:00, genyjoannerubiera
In which view can you see speaker notes?
Answers: 1
Do you know the correct answer?
Objective To learn how to use Java Collections. To use enhanced for loops on Java Collections. Assig...

Questions in other subjects:

Konu
Mathematics, 18.03.2021 03:20
Konu
Mathematics, 18.03.2021 03:20