I have to write a program that reads a student’s nametogether with his or her te
ID: 3611034 • Letter: I
Question
I have to write a program that reads a student’s nametogether with his or her test scores. The program should thencompute the average test score for each student and assign a grade.The grade scale is as follows: 90-100, A; 80-89, B; 70-79, C;60-69, D; 0-50, F.
The program must use the following methods:
a. Avoid method, calculateAverage, to determine the average offive test scores for each student. Use a loop to read and sum thefive test scores. That task must be done in the method main.
b. Avalue-returning method, calculateGrade, to determine and returneach student’s grade. (This method does not output the grade.That task must be done in the method main.)
I have to read the data from a file and send the output to afile. I cannot use any global variables.
Johnson 85 83 77 91 76
Aniston 80 90 95 93 48
Cooper 78 88 11 90 73
Gupta 92 83 30 69 87
Sample Output: The output is supposed to be inthe following form.
Student Test1 Test2 Test3 Test4 Test5 Average Grade
Johnson 85 83 77 91 76
Aniston 80 90 95 93 48
Class Average =