Question: in blue j Create a class called GradeList that has a single field called grades that is an ArrayList of Integer objects . Write a
in blue j
Create a class called GradeList that has a single field called grades that is an ArrayList of Integer objects.
Write a constructor that initializes grades to an empty ArrayList.
Write a method called addGrade that adds a specified grade to grades.
Write a method called printGrades that prints the grades in the collection one grade per line.
Write a method called sortGrades that sorts the grades in the collection in ascending order (Hint: Check the documentation for the Collections class for a method to do this).
Write a method called findMaxGrade that returns the grade in the collection with the maximum value (Hint: Check the documentation for the Collections class for a method to do this).
Write a method called removeGrades that removes all occurrences of a specified grade in the collection.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
