Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

1 2 3 Data Base Techniques

Authors: Dick Andersen

1st Edition

0880223464, 978-0880223461

More Books

Students also viewed these Databases questions

Question

explain what is meant by the terms unitarism and pluralism

Answered: 1 week ago