Create a
java program that accepts student names and
test scores from a file and displays their name, average score and letter grade to the screen. Your program will then display summary information as explained below.
For testing, create an input file with at least 4 students with 3 grades per student like the following:
Connie 82 95 79
James 97 99 80
Susan 15 67 75
Jake 72 65 62
Karen 82 72 78
Name the file grades.txt.
Your program must use a looping structure to read the file, calculate each students average scores then display the students name, their average and letter grade as shown below.
Your program also must count the number of students who earned an A, B, C, D and F. Also, calculate the average grade for the entire class.
You program MUST use a looping structure to read the file and to process each students average score (inner loop).
EXAMPLE Output:
Connie has an average grade of 85.33%. You will receive a B in this class.
James …….
For each student…
Overall Class Average is 78.23%
The following lists the number of students earning each letter grade:
A = 2
B = 1
C = 5
D = 2
F = 1
Error I get is: Exception in
thread "main" java.lang.NullPointerException
at Grades.main(Grades.java:19)
But I'm sure that there is more