Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // printStudentInfo
- void Student::printStudentInfo()
- {
- auto iter = coursesCompleted.begin();
- auto iterEnd = coursesCompleted.end();
- cout << "Student Name: ";
- Person::printName();
- cout << endl << endl;
- cout << "Student ID: " << studentID << endl;
- cout << "Number of courses completed: " <<
- static_cast<int>(coursesCompleted.size());
- cout << endl << endl;
- cout << "Course" << setw(10) << "Units" << setw(10) << "Grade" << endl;
- int unitHours = 0;
- while (iter != iterEnd)
- {
- cout << iter->first.getCoursePrefix() << " "
- << iter->first.getCourseNo() << setw(9);
- cout << fixed << setprecision(2) << iter->first.getCourseUnits();
- if (tuitionWasPaid) cout << setw(8) << iter->second << endl;
- else cout << setw(10) << "***" << endl;
- unitHours += static_cast<int>(iter->first.getCourseUnits());
- ++iter;
- }
- cout << endl << endl;
- cout << "Total number of unit hours: " << unitHours << endl;
- if (tuitionWasPaid) cout << "Current Term GPA: " << getGpa() << endl;
- else cout << "*** Grades are being held for not paying "
- << "the tuition. ***" << endl;
- cout << "-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-" << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement