The program to convey the information will be shown below.
How to explain the programThe program will be:
import java.util.Scanner;
public class Student {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("Please provide the student's name: ");
String studentName = scanner.nextLine();
int[] grades = new int[20];
int gradeCount = 0;
int grade;
do {
try {
System.out.print("Enter a grade from 0 to 100 (-1 to quit): ");
grade = scanner.nextInt();
if (grade >=0 && grade <= 100) {
grades[gradeCount] = grade;
gradeCount++;
} else if (grade != -1) {
System.out.println("This is an invalid grade, kindly enter a number between 0 and 100 or -1 to exit.");
}
} catch (Exception e) {
System.out.println("There was an error with a type mismatch!");
break;
}
} while (grade >= 0 && gradeCount <20);
Grades studentGrades = new Grades(studentName);
int highestGrade = studentGrades.getHighestGrade(grades, gradeCount);
System.out.println(studentGrades.getStudentName() + "'s highest grade is " + highestGrade);
}
}
Learn more about Program on
https://brainly.com/question/26642771
#SPJ1