(Solved) : Write Program Called Printgpa Program Contain Least 3 Methods Main Gradeaverage Lettergrad Q35600152
Write a program called printGPA. Theprogram should contain at least 3 methods: main, gradeAverage, andletterGrade.
The user will type aline of input containing the student’s name, then a number thatrepresents the number of scores, followed by that many integerscores (user input is in bold below). The data type used for theinput should be one of the primitive integer data types. Here aretwo example dialogues:
Enter a student record: Maria 572 91 84 89 78
Maria’s grade is 82.8.
Maria’s final letter grade is B.
Enter a student record: Jordan4 86 71 62 90
Jordan’s grade is77.25. Jordan’s final letter grade is C.
The method gradeAverage accepts aScanner for the console parameter and then calculates and returnsthe student’s grade point average. The method letterGrade takes oneparameter, the students grade point average and then computes andreturns the students final letter grade. The students final lettergrade is based on the following table:
gradeAverage andletterGrade should not contain any System.out.print statements. Theoutput should be formatted so the average does not contain morethan 2 decimal places.
If you would like to earnbonus points, throw out the lowest score whencomputing average. For example, Jordan’s final average wouldbe:
Jordan’s grade is82.33 because the students average of (86 + 71 + 90) / 3 equals82.33. Jordan’s lowest score was 62 and was thrown out.