The Grades class you write should provide the functionality shown in the table below:
Grades Class
-ArrayList<Double> grades
+Grades()
+calcAverage():double
+dropLowest(): double
+addGrade (grade:double)
+removeAllGrades (grade:double): boolean
+printSortedGrades ()
+toString(): String
Description
Instance variable
Default constructor constructs the grades ArrayList. It will
have no grades in the ArrayList
Method that calculates the average of all the grades in the
ArrayList and returns the average
Method that finds the lowest grade in the ArrayList and
removes the grade. If the lowest grade is in the ArrayList
multiple times then only one grade is dropped.
Method that adds the grade passed as a parameter to the
ArrayList to the END of the list
Method that removes all grades that match the parameter
that is passed i to the method, returns true if a grade was
found, false otherwise
Prints the Grades in sorted order (lowest to highest) in the
console window. This method can permanently change
the order of the list.
Override the Object's toString() method to display the
grades in the ArrayList like
Grades [34.0, 23.0, 10.5, 88.0, 23.0, 23.0, 23.0,
90.5]