Question
Write the methods needed to complete this program. This is an exercise in manipulating arrays - so DO NOT use built in math methods to
Write the methods needed to complete this program. This is an exercise in manipulating arrays - so DO NOT use built in math methods to find the minimum, maximum, or average. DO NOT add any prompts because it is auto-graded and any deviation from the correct output will be graded as wrong (and a prompt is considered output). The program inputs TEN INTEGER grades from the keyboard, and outputs the largest, smallest, average, and deviation of each from the average. NOTE: deviation of grade[i] is calculated as grade[i]-average.
import java.text.DecimalFormat; import java.util.Scanner;
public class L18 {
public static void main(String[] args) { DecimalFormat df = new DecimalFormat("##.##"); int [] grades = getInput(); int highest=findHighest(grades); System.out.println("The highest grade was " + highest); int lowest=findLowest(grades); System.out.println("The lowest grade was " + lowest); double average = findAverage(grades); System.out.println("The average grade was " + average); double[]deviation = findDeviation(grades, average); for (int i=0; i
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