Question: Consider the Student class containing proper constructors(as used in the following code), and getName() and getGrade() public methods with the obvious meaning. Assume the following

 Consider the "Student" class containing proper constructors(as used in the following

Consider the "Student" class containing proper constructors(as used in the following code), and getName() and getGrade() public methods with the obvious meaning. Assume the following code as part of the main method of a TestStudent class: Public static void main(String[] args) {ArrayList list = new Array List(); list.add(new Student("John", 80)); list.add (new Student("Kim", 70)); list.add (new Student("Peter", 92)); list.add (new Student("Sam", 84)); printTopScore(list);} Write the method called printTopScore for the TestStudent class that will print the highest score. Make sure your program will work for any number of students with any score

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!