rite a java program that uses the methods written in thissection to do the following:Prompt the user for a number of gradesusing the getValidInput method. Ensure the number of grades isgreater than 1 and less than 30. The error message is “You mustenter a number between 1 and 30, please re-enter:â€Prompt the userto enter the requested grades and total marks using thecalculateLetterGrade method. The grades should be between 0 and100. Display an appropriate error message where required. Usevariables to count the number of each letter grade returned.Whenall grades have been entered display the distribution of gradesusing the showGradeDistribution method.?