// CS2310 Project 4 Implementation file #include #include #include "Proj3_prototype.h" void LinkedStuRecords::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: // A new node is allocated and data of the new record // stored in the node and the node is inserted into the list // at the proper position. The resulting list is still ordered. // Write your implementation here. } void LinkedStuRecords::CalLetGrade() { // Postcondition: // Go through the list, calculate the letter grade for each student // by averaging the three numerical grades. // Write your implementation here. } void LinkedStuRecords::PrintByGrades() const { // Postcondition: // Traverse the list and print out student records by the // letter grades, with the records of 'A' first, 'B' the // second, ..., 'F' the last. For student records with the // same grade, print then out in lexicographic // order by last names. In case last names are the same, sort // the records in lexicographic order by first names. // Write your implementation here. } void LinkedStuRecords::PrintByRanks() const { // Postcondition: // Traverse the list and print out student records by the // ranks, with the records of 'Freshmen' first, 'sophomore' // the second, 'junior' the third, and 'senior' the last. For // student records with the same rank, print then out in // lexicographic order by last names. In case last names are // the same, sort the records in lexicographic order by first // names. // Write your implementation here. } LinkedStuRecords::LinkedStuRecords() { // Default constructor. head = NULL; } int main() { stuRecord recordTemp; // Step 1. Open the input file and read in student records // one by one, using recordTemp as the container. // After reading one record, call member function // InsertRecord to insert the record into the list. // So, you may use a loop like this: // // for (i=0; i