/*This program will read in student data from a file and create a report file sorted by grades. The program will also report the course, and section(s) to the screen with the average score and curved grade along with their corresponding letter grades. Follow the inintions contained in this file. Nikola Ivetich CIS 166 Final Project */ #include #include #include int getClass(ifstream &in, recordType s[], int size); void printClass(ofstream,struct,int); int findHighScore(struct,int); void curveGrades(struct,int); void sortByGrades(struct,int); float findAverageGrade(struct,int); float findAverageCurvedGrade(struct,int); char getLetterGrade(int); using namespace std; struct recordType { string firstName; string lastName; string course; int finalScore; int possiblePoints; int finalGrade; int curveGrade; char letterGrade; };//end recordType int main() { int n=0; int size; recordType studentRecord[];//create identifier float aveGrade[];//has identifier int aveCurveGrade[]; int classSize; int findHighScore; ifstream classData; ofstream gradeReport; classData.open("classData");//opening the file return 0; }; /*********************************************************/ recordType getRecordtype(ifstream &inFile) { recordType sRecord; char bogus; inFile>>studentRecord.firstName>>studentRecord.lastName>>studentRecord.course>>studentRecord.finalScore>> studentRecord.possiblePoints>>studentRecord.finalGrade>>studentRecord.curveGrade>>studentRecord.letterGrade; //this is passing the student record to student in parameter of class size. classSize=getClass(classData, studentRecord, Size) n++; return sRecord; } /*****************************************************/ int getClass(ifstream &in, recordType s[], int size){ int n=0, i=0; in>>s[i].lastName; // priming read while( in ){ in>>s[i].firstName>>s[i].course>>s[i].finalScore>>s[i].possiblePoints; i++; n++; in>>s[i].lastName; } // end input for loop return n; }//end getClass() /*****************************************************/ void sortByGrade(recordType, s[], Size) { int holdElement; for(int i=0; i