Java Program
1. Write a class that reads in a group of test scores (positiveintegers from 1 to 100) from the keyboard. The main method of theclass calls a few other methods to calculate the average of all thescores as well as the highest and lowest score. The number ofscores is undetermined but there will be no more than 50. Anegative value is used to end the input loop.
import java.util.Scanner;
public class GradeStat
{
final static int MAXGRADES = 50; // maximum # of grades
public static void main (String[] args) {
int[] gradeArray = new int[MAXGRADES];
int pos = 0; // Index to the array
double avgOfGrades;
OR
OR