// assn4.cpp // This file is the main file for assignment #4. It has the menu functionality // in it but other functionality is held in the Section and Student classes. #include "Section.h" int main() { cout << "Enter student names followed by quit.\n"; Section sect; if(sect.getNumStudents()<1) { cout << "No students were entered.\n"; return 0; } char option; // Loop for the menu. do { cout << "\nSelect from the following options:\n a: add assignment grade\n q: add quiz grade\n t: add test grade\n p: change participation grade for student\n d: display class data\n s: print student data\n x: exit\n"; cin >> option; switch(option) { case 'a': sect.addAssn(); break; case 'q': sect.addQuiz(); break; case 't': sect.addTest(); break; case 'p': sect.changeParticip(); break; case 'd': sect.display(); break; case 's': sect.printStudent(); break; case 'x': cout << "Goodbye!\n"; break; default: cout << "Invalid option. Try again.\n"; break; } } while(option!='x'); }