/* * Note to CS70 students: this is an incomplete source file. You must * complete it as you feel appropriate. Search for "ADD STUFF" to * find places you *MAY* need to change. * * Note that many comments are missing. We have not provided "ADD * STUFF" hints for missing comments. */ #include "course.hh" #include "student.hh" #include #include #include /* * Table of Contents: the following routines are defined in this file: * * Course::Course(); * Course::Course(const string department_, * int courseNumber_, const string meetingTime_, * int maxEnrollment_); * // Construct from parameters * Course::~Course(); * void Course::fillInInfo(const string department_, * int courseNumber_, const string meetingTime_, * int maxEnrollment_); * // Set or change course info * bool Course::isFull() const; * // Return true if course is at * // ..maximum enrollment * bool Course::courseIs(const string testDepartment, * int testNumber) const; * // Return true if course department * // ..and number match parameters * bool Course::addStudent(Student* enrollee); * // Add a student to the course, also * // ..adding the course to student's * // ..schedule * void Course::removeStudent(Student* dropper); * // Remove a student from the course, * // ..also adding the course to * // ..student's schedule * void Course::changeMeetingTime(string newMeetingTime); * // Reschedule course * ostream& Course::showName(ostream& targetStream) const; * // Display course name on a stream * ostream& Course::print(ostream& targetStream) const; * // Display all course info on a stream * void Course::kickOutStudents(); * // Deenroll all students */ Course::Course() : department(NULL), courseNumber(0), meetingTime(NULL), maxEnrollment(0), roster(NULL) { } Course::~Course() { /* * Before deleting the course, we must deenroll all students. */ kickOutStudents(); // ADD STUFF } void Course::fillInInfo( const string& department_, int courseNumber_, const string& meetingTime_, int maxEnrollment_) { // ADD STUFF } bool Course::isFull() const { // ADD STUFF } bool Course::courseIs( const string& testDepartment, int testNumber) const { // ADD STUFF } bool Course::addStudent( Student* enrollee) { // ADD STUFF } bool Course::removeStudent( Student* dropper) // Student who is dropping the course { // ADD STUFF } void Course::changeMeetingTime( const string& newMeetingTime) { // ADD STUFF } ostream& Course::showName( ostream& targetStream) const { // ADD STUFF return targetStream; } ostream& Course::print( ostream& targetStream) const { // ADD STUFF return targetStream; } void Course::kickOutStudents() // Deenroll all students { // ADD STUFF }