Name: ____________________________________________________ Alpha: _____________________
Describe help received: _________________________________________________________________
hw.cpp
// hw.cpp
#include "student.h"
int main() {
int n = 0;
Student* stu = readfile(n);
sort(stu, n);
print(stu, n);
return 0;
}
The program is supposed to do as follows:
~/$ ./a.out File name: grades.txt Caitlyn Zoom avg=57.9 67 45 83 38 88 45 23 78 30 82 Edward Needham avg=71.1 89 52 90 67 56 90 95 63 52 57 Andy Smith avg=71.9 97 65 63 89 69 84 51 78 68 55 Rebecca Wright avg=72.4 76 85 77 95 87 72 64 62 55 51 Benjamin Adams avg=73.5 58 96 65 72 93 67 59 74 95 56 Jason Rafter avg=74.2 96 66 58 71 87 59 81 78 69 77 Aaron Landau avg=76.5 76 97 88 69 64 94 54 75 83 65 Jake McCrary avg=78.4 61 91 56 62 81 91 92 91 61 98 John Poe avg=80 96 96 84 68 54 98 80 55 73 96 Thomas Brown avg=81.3 96 67 56 74 94 100 98 68 95 65 Julie Jones avg=84.3 88 81 94 59 95 65 98 88 93 82
To do:
hw.cpp. Don't change hw.cpp at all!!!
student.h and
student.cpp so that the program works as above.
g++ hw.cpp student.cpp
Student probably also needs to hold the information about how many grades each student has.
Turn In a printout of your source code files (i.e., student.h, student.cpp) along with a screen capture showing the output of your program.