In the previous assignment you had written a program to determine if a student is going to receive a passing grade in CSCE 155 with the scores entered from a keyboard. In this assignment you will write a program that reads the information from a file for all students in the class. In addition, you must read all the scores from a file named Grades.txt. The structure of the file is as follows:
The first line of the file lists the number of students in the class. Each line after that shows the name and scores of the students in each element of the course. The name of the student is specified as the first and last name of the student. The scores are specified a sequence of 28 numbers separated by white space.
Numbers from 1 to 6: Assignment scores.
Numbers from 7 to 21: Lab scores.
Number 22: Midterm Exam 1 score.
Number 23: Midterm Exam 2 score.
Number 24: Final Exam score.
Number 25: Total Quiz score.
Number 26: Attendance score.
Number 27: PAT score.
Number 28: Zyante score.
Your program should read the scores for each student, compute the total homework and test scores and print them. Print the name and the total scores (homework and test), for each student in the class on separate lines.
Your program must also print the name and total score for the students with the highest assignment and test scores. Your program must also print the name, total scores for the students with the lowest assignment and test scores.
Finally, your program should also state the percentage (rounded to the nearest whole number) of the score for the homework score (total is 1200) and the test score (total is 300).
Note: this is the output expected if you use the file Grades.txt that will be available on Blackboard.
Anthony Hopkins - Assignments: 854 (71%) Tests: 284 (95%)
John Smith - Assignments: 730 (61%) Tests: 214 (71%)
Pan Mei Assignments: 730 (61%) Tests: 267 (89%)
Rafael Vega Assignments: 801 (67%) Tests: 236 (79%)
Highest assignment score – Anthony Hopkins: 854
Lowest assignment score – John Smith: 730
Highest test score – Anthony Hopkins: 284
Lowest test score – John Smith: 214
You will receive extra credit if your program shows all the scores aligned. This is a sample output that would receive extra credit.
Name Assignment score Test score
Anthony Hopkins 854 (71%) 284 (95%)
John Smith 730 (61%) 214 (71%)
Pan Mei 730 (61%) 267 (89%)
Rafael Vega 801 (67%) 236 (79%)
Highest assignment score – Anthony Hopkins: 854
Lowest assignment score – John Smith: 730
Highest test score – Anthony Hopkins: 284
Lowest test score – John Smith: 214