When you have completed the program, submit the source file assign6.cpp as an attachment to Assignment 06 in TalonNet.
Each program must include the following as comments at the beginning of your program
name
student number
assignment information
program documentation
You must also include user documentation: a description of what the program will do and information about what the user will be expected to enter.
Grade Book Program
A teacher has N students who have taken four tests. The teacher uses the following grading scale to assign a letter grade to a student based on the average of his or her four test scores.
Test Score
Letter Grade
90 - 100
A
80 - 89
B
70 - 79
C
60 - 69
D
0 - 59
F
Write a program that uses the following arrays. You may use additional arrays/variables, but you must use the following:
The maximum number of students in the class is 25 but there may be fewer than 25. You will need to keep track of the number of students in the class as you read in records from the data file ( here is a link to the data file: classData.txt ) to accurately calculate the class average for each of the 4 tests ( this will be the value of N... ).
an array of strings to hold the student names,
a single-dimensional array of characters to hold the students' letter grades, and
a two-dimensional array of integers ( 25 rows, 4 columns ) to hold the class data where a row corresponds to a student and a column corresponds to a test.
You must calculate and print the following information:
Each student's average test score ( calculate to 2 decimal positions )
Each student's class grade based on his/her test average
The CLASS average for each of the 4 tests ( Test 1, Test 2, etc... )
The data for the students is stored in a data file in the following format: test_1 test_2 test_3 test_4 Student Name ( 4 integers followed by a string ).
Example: 92 83 91 89 John Centeno John's test average would be 88.75, his course grade would be B
Use the member member function eof( ) to determine when you are at the end of the data file. Your loop will be a sentinel controlled loop. I should be able to vary the number of student records in the data file and your program still work correctly.
while ( ! inFile.eof() ) or while( inFile.eof() == false )
Collect all of the information, do the calculations, and then print out a report when you are finished ( to the screen ) that includes the students' name, scores on the exams, test average, and class grade.
At the end of the report, print the class averages for each of the 4 tests.