Write a program that reads from a formatted file students' records (one student per line). The format of the lines forms the file is the following:
Name Test1 Test2 Test3
where Name is the last name of a student (string without spaces), and Test1, Test2 and Test3 are floating-point test grades between 0 and 100, and the 4 columns are separated by tabs.
For each student, the program should compute and store in the following 3 variables (with these exact names):
The program should also compute the number of students (lines in the file) and store it in the variable NumberStudents and the average of the all the students' numeric grades and store it in variable AverageNumericGrade.
The program should output to the console - the data read and computed from the file in this format (data should be in the exact table columns format, with the exact header and the values from the variables; the table for STUDENT STATISTICS should have a row for every student/line from the file; all headers and text/character columns should be aligned to the left; all floating-point values should be aligned to the right and formatted with 2 decimals; tables do not need to have lines/borders):
STUDENT STATISTICS:
NAME | TEST 1 | TEST 2 | TEST 3 | TOTAL POINTS | NUMERIC GRADE | LETTER GRADE |
Name | Test1 | Test2 | Test3 | TotalPoints | NumericGrade | LetterGrade |
CLASS STATISTICS:
STATISTIC | VALUE |
NUMBER | NumberStudents |
AVERAGE | AverageNumericGrade |
For example, if the file has the data from the table below with blue background, the output should be:
STUDENT STATISTICS:
NAME | TEST 1 | TEST 2 | TEST 3 | TOTAL POINTS | NUMERIC GRADE | LETTER GRADE |
Name1 | 95.5 | 85.5 | 92 | 273 | 91.00 | A |
Name2 | 72 | 65.5 | 85 | 222.5 | 74.17 | C |
Name3 | 100 | 95.5 | 100 | 295.5 | 98.50 | A |
Name4 | 52 | 45.5 | 58 | 155.5 | 51.83 | F |
CLASS STATISTICS:
STATISTIC | VALUE |
NUMBER | 4 |
AVERAGE | 78.88 |
You can test your program on the attached Assignment5Data.txt (do edit the file), but your program should work on any other files that have the correct format, thus, do not hardcode the output or the number of students.
Your program should be user-friendly (prompt user for input and show a message/explain the output) and programmer- friendly (have comments at the beginning of the code explaining the program and before each line of code explaining what the line is doing) and use only C++ concepts learned in class so far.
Create a Microsoft Word document that contains screenshots of your entire C++ code (take multiple screenshots if the code is larger than one screen), and the entire console output for the attached Assignment5Data.txt (take multiple screenshots if the output is larger than one window).
Assignment5Data.txt
A 91.5 95 92
B 85.5 90 95.5
C 55 30 100
D 95 85 94.5
E 80 100 75.5
F 55 90 25.5
G 93.6 90.5 75
H 25 60 80
I 100 95.5 95
J 75 90 80
K 55 85 98.5