Question: Lab Description : Instantiate an array, load it with values. Find the total, average, max, and min. Sample Data : 100 90 85 72.5 95.6

Lab Description : Instantiate an array, load it with values. Find the total, average, max, and min. Sample Data : 100 90 85 72.5 95.6 50.0 100.0 80.0 93.4 -90.0 90.0 1 2 3 4 5 6 7 8 9 Sample Output : grade 0 :: 100.0 grade 1 :: 90.0 grade 2 :: 85.0 grade 3 :: 72.5 grade 4 :: 95.6 total = 443.1 average = 88.62 maximum = 100.0 minimum = 72.5 average with dropped lowest = 92.65 WOW! Your average went up 4.03 points! *************************************************** grade 0 :: 50.0 grade 1 :: 100.0 grade 2 :: 80.0 total = 230.0 average = 76.67 maximum = 100.0 minimum = 50.0 average with dropped lowest = 90.0 WOW! Your average went up 13.33 points! *************************************************** grade 0 :: 93.4 grade 1 :: -90.0 grade 2 :: 90.0 total = 93.4 average = 31.13 maximum = 93.4 minimum = -90.0 average with dropped lowest = 91.7 WOW! Your average went up 60.57 points! *************************************************** grade 0 :: 1.0 grade 1 :: 2.0 grade 2 :: 3.0 grade 3 :: 4.0 grade 4 :: 5.0 grade 5 :: 6.0 grade 6 :: 7.0 grade 7 :: 8.0 grade 8 :: 9.0 total = 45.0 average = 5.0 maximum = 9.0 minimum = 1.0 average with dropped lowest = 5.5 WOW! Your average went up 0.5 points! *************************************************** Computer Science I Lab07A GRADES Lab Value - 100

Programs needed: Grades.java GradesRunner.java (finished)

Program completed by: your name here

GRADESRUNNER.JAVA

/Name - //Date - //Lab - import java.util.*; import static java.lang.System.*; //this runner is finished public class GradesRunner { public static void main( String args[] ) { Grades test = new Grades(new double[]{100,90,85,72.5,95.6}); System.out.println(test); test.setGrades(new double[]{50.0,100.0,80.0}); System.out.println(test); test.setGrades(new double[]{93.4,-90.0,90.0}); System.out.println(test); test.setGrades(new double[]{1,2,3,4,5,6,7,8,9}); System.out.println(test); out.println (" Program completed by: your name here"); } }

GRADES.JAVA

//Name - //Date - //Lab - import java.util.*; import static java.lang.System.*; public class Grades { private double[] grades; //**finish this initialization constructor public Grades(double[] nums) { } //**finish this mutator public void setGrades(double[] nums) { } //**this method will return the total of all the elements // in the array public double getTotal() { double total = 0.0; return total; } //**this method will return the average of all the elements // in the array; use the getTotal() method above public double getAverage() { double average=0.0; return average; } //**this method will return the average with the lowest grade dropped public double getAverageDropLowest() { return 0; } //**this method will return the maximum of all the elements // in the array public double getHighest() { double max=0.0; return max; } //**this method will return the minimum of all the elements // in the array public double getLowest() { double min=0; return min; } public double roundTwo(double x) { return 0; } public String toString( ) { String output=""; return output; } } 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!