// CS2310 Project 3 Implementation file #include #include #include "Proj2_prototype.h" StuRecord:: StuRecord(/* parameter list */) { // constructor } void StuRecord::Initialize(/* parameter list */) { // Initialize this record. } String StuRecord:: GetfstName() { // An observor that returns the first name. } String StuRecord:: GetlstName() { // An observor that returns the last name. } letRank StuRecord:: GetletRank() { // An observor that returns the rank. } letGrade StuRecord:: GetletGrade() { // An observor that returns the letter grade. } void StuRecord::PrintRecord(/* parameter list */) { // Print out this record in proper format } void StuRecord::CalLetGrade(/* parameter list */) { // Calculate the letter grade of this student. } void SortedStuRecords::InsertRecord(stuRecord& newRecord) { // Precondition: // A new student record is passed in by newRecord. The student // records in the list are sorted in alphabetical order by // last names. // Postcondition: // The new record is inserted into the list at the proper // position. The resulting list is still ordered. length // variable is incremented. // Hint: consider how to use the member function // initialize of StuRecord class to set up // the record. // Write your implementation here. } void SortedStuRecords::CalLetGrade() { // Postcondition: // Go through the array, calculate the letter grade for each student // by averaging the three numerical grades. // Hint: consider how to use member function // CalLetGrade of StuRecord class. // Write your implementation here. } void SortedStuRecords::PrintByGrades() const { // Postcondition: // Print out student records by the letter grades, with the records // of 'A' first, 'B' the second, ..., 'F' the last. // Hint: consider how to use the PrintRecord // member function of StuRecord class. // Write your implementation here. } void SortedStuRecords::PrintByRanks() const { // Postcondition: // Print out student records by the ranks, with the records // of 'Freshmen' first, 'sophomore' the second, 'junior' the // third, and 'senior' the last. // Hint: consider how to use the PrintRecord // member function of StuRecord class. // Write your implementation here. } SortedStuRecords::SortedStuRecords() { // Default constructor: Zero the length of the array. length = 0; } 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 array. // So, you may use a loop like this: // // for (i=0; i