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 23:00
Suppose s, t, and w are strings that have already been created inside main. write a statement or statements, to be added to main, that will determine if the lengths of the three strings are in order by length, smallest to largest. that is, your code should determine if s is strictly shorter than t, and if t is strictly shorter than w. if these conditions hold your code should print (the boolean value) true. if not, your code should print false. (strictly means: no ties) example: if s, t, and w are "cat", "hats", and "skies" your code should print true - their lengths are 3-4-5; but if s, t, and w are "cats" "shirt", and "trust", then print false - their lengths are 4-5-5 enter your code in the box below
Answers: 2
question
Computers and Technology, 23.06.2019 02:00
Consider the following function main: int main() { int alpha[20]; int beta[20]; int matrix[10][4]; . . } a. write the definition of the function inputarray that prompts the user to input 20 numbers and stores the numbers into alpha. b. write the definition of the function doublearray that initializes the elements of beta to two times the corresponding elements in alpha. make sure that you prevent the function from modifying the elements of alpha. c. write the definition of the function copyalphabeta that stores alpha into the first five rows of matrix and beta into the last five rows of matrix. make sure that you prevent the function from modifying the elements of alpha and beta. d. write the definition of the function printarray that prints any onedimensional array of type int. print 15 elements per line. e. write a c11 program that tests the function main and the functions discussed in parts a through d. (add additional functions, such as printing a two-dimensional array, as needed.)
Answers: 3
question
Computers and Technology, 23.06.2019 13:30
What is the primary difference between the header section of a document and the body? a. the body is displayed on the webpage and the header is not. b. the header is displayed on the webpage and the body is not. c. the tag for the body is self-closing, but the tags for the headers must be closed. d. the tag for the header is self closing, but the tag for the body must be closed.
Answers: 3
question
Computers and Technology, 25.06.2019 05:00
Which of the following statements best deceive the relationship between carrying capacity and population size
Answers: 1
You know the right answer?
Objective To learn how to use Java Collections. To use enhanced for loops on Java Collections. Assig...
Questions
question
English, 11.09.2020 03:01
question
Mathematics, 11.09.2020 03:01
question
Mathematics, 11.09.2020 03:01
question
Mathematics, 11.09.2020 03:01
question
Mathematics, 11.09.2020 03:01
question
Mathematics, 11.09.2020 03:01
question
Mathematics, 11.09.2020 03:01
question
Computers and Technology, 11.09.2020 03:01
question
Mathematics, 11.09.2020 03:01
question
Mathematics, 11.09.2020 03:01
question
Computers and Technology, 11.09.2020 03:01
question
Computers and Technology, 11.09.2020 03:01
question
Mathematics, 11.09.2020 03:01
question
Mathematics, 11.09.2020 03:01
question
Mathematics, 11.09.2020 03:01
question
Biology, 11.09.2020 03:01
question
Mathematics, 11.09.2020 03:01
question
Mathematics, 11.09.2020 03:01
question
Mathematics, 11.09.2020 03:01
question
Mathematics, 11.09.2020 03:01
Questions on the website: 13722360