Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Java Objective To learn how to use Java Collections. To use enhanced for loops on Java Collections. Assignment In this assignment you will write a
Java
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 method Math.sqrt in this assignment. You will want to use the wrapper class Integer in declaring Collections and in enhanced for loops. Sample Input File 10 19 Sample Output The average grade is 9.0 The standard deviation is 6.363961030678928
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started