Gradebook called printGrades that accepts an array of doubles as an argument and prints out all the grades in the array. Replace the loop in the main method that prints out all the grades with a class to printGrades method. Compile and run.Gradebook called averageGrade that takes an array of doubles as an argument and returns the average grade. Replace the loop and calculations in the main method that determines the average grade with a call to the averageGrade method. Your main method should still print out the user's average grade and the letter grade the user earned. Compile and run.main method of Gradebook so that it converts its String arguments into doubles and intializes the grades in the array to those numbers. Use the method Double.parseDouble to convert a String containing a double to an acutal double. Compile and run and provide arugments at the command line like this:
EasyReader is a file we wrote for you that makes it easy to read data the user types in. It has several methods, two of which are readInt and readDouble. The readInt method waits for the user to type in an integer and press enter, and it returns the integer the user types in. The readDouble does the same thing, but for doubles.readInt or readDouble method, you have to type EasyReader.readInt() or EasyReader.readDouble(). For example, to read a double from the user and assign to it a varible d, you could use the following code:
double d = EasyReader.readDouble():Try modifying your code so that instead of just taking the array of grades from the
main method, theprogram asks the user to enter the grades. Hint: use the two EasyReader methods discussed!main method so that after asking the user to enter the grades, it prints out a menu of two options for them:
Submission: Submit all of your code for this lab.