// CS2310 Project 4 Specification file #define MAX_NAME_LENGTH 15 #define LEN_SSN 10 enum letRank {Freshment, Sofomore, Junior, Senior}; enum letGrade {A, B, C, D, F}; struct stuRecord { char fstName[MAX_NAME_LENGTH]; char lstName[MAX_NAME_LENGTH]; char ssn[LEN_SSN]; letRank rank; char letGrade; int grades[3]; stuRecord* link; }; typedef stuRecord* StuRecPtr; class LinkedStuRecords { public: void InsertRecord(stuRecord& newRecord); // Precondition: // A new student record is passed in by newRecord. The student // records in the list are sorted in lexicographic order by // last names. // Postcondition: // The new record is inserted into the list at the proper // position. The resulting list is still ordered. void CalLetGrade(); // Postcondition: // Go through the list, calculate the letter grade for each student // by averaging the three numerical grades. void PrintByGrades() const; // Postcondition: // Print out student records in lexicographic order by last names, // with the records of 'A' first, 'B' the second, ..., 'F' the last. void PrintByRanks() const; // Postcondition: // Print out student records in lexicographic order by last names, // with the records of 'Freshmen' first, 'sophomore' the second, // 'junior' the third, and 'senior' the last. LinkedStuRecords(); // Default constructor. private: StuRecPtr head; // Head pointer. };