Using class data type to write a simple student records report program
As records secretary for Cougar High School, you have been asked by the principal to prepare a report on the grades of some of the school’s top athletes. Specifically, you must print each of the athlete’s average letter grades based on their scores from three academic courses. Input will be taken from the file stufile.txt, which is organized as follows: Each athlete in the file has four lines of information recorded – name (at most 20 characters including the comma and white space), student ID (SS#), class rank (1=Freshman, 2=Sophomore, 3=Junior, 4=Senior), and the three scores. Information for at most 15 athletes is stored in the file, but the first line of the file contains an integer showing the exact number of athletes.
Use class data type as data representation of a student record. Then, design member functions to do the statistics, reporting, etc. Look at the sample specification file proj1_prototype.h for the suggested data type declarations. For each student, your program should calculate the average of the 3 scores and determine the letter grade based on the average (A – 90 or above, B – between 80 and 90, C – between 70 and 80, D – between 60 and 70, and F – below 60). also, your program must find the students with the highest and the lowest averages.
Your program must read in student information from “stufile.txt”. You can create the file and copy the examples in the following and save them in the file. Or, you can create your own file using the format specified above.
You can assume that all scores are integers from 0 to 100. Output from this program should be printed out on the screen. The output of the program should include the echo-print of all the records that are read from the input file and the statistical data specified as follows. When printing each student record, the column of student ID numbers should be aligned at least one space beyond the maximum name length, the column of class ranks should be aligned at least one space beyond the column of student IDs, and the column of grades should be aligned at least one space beyond the column of class ranks. Echo-printing of the students records must begin with a heading (see the example in the following). Students ranks must be printed as “Freshman”, “Sophomore”, “Junior”, or “Senior”, instead of a number. In the end of the output, the name of the students with the highest average and the lowest average must be printed with proper labeling (see the example output at the bottom of this page).
Turn in a print-out of your source code and a diskette containing the header (.h) file, source code (.cpp file), and the input files.