/* * 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 /* * Table of Contents: the following routines are defined in this file: * * Student::Student(); * Student::Student(const char* firstName_, * const char* lastName_, const char* hairColor_); * Student::~Student(); * void Student::fillInInfo(const char* firstName_, * const char* lastName_, const char* hairColor_); * // Fill in student info * const char* Student::name() const; * // Return student's full name * bool Student::overloaded() const; * // True if can't add any more courses * bool Student::changeHairColor(const char* newColor); * // Dye student's hair * bool Student::addCourseToSchedule(Course* course); * // Insert course in schedule * void Student::removeCourseFromSchedule(Course* course); * // Remove course from schedule * ostream& Student::print(ostream& targetStream) const; * // Produce representation of student * void Student::dropAllCourses(); * // Remove student from all enrollment */ Student::Student() : fullName(NULL), hairColor(NULL), courseCount(0) { // ADD STUFF } Student::Student( const char* firstName_, const char* lastName_, const char* hairColor_) // ADD STUFF { // ADD STUFF } Student::~Student() { // ADD STUFF } /* * Pseudo-constructor to fill in student information after the fact. * This should really be done using a copy constructor and assignment * operator, but I'm not 100% sure we'll have covered them in time. */ void Student::fillInInfo( const char* firstName_, const char* lastName_, const char* hairColor_) { // ADD STUFF } const char* Student::name() // Return student's full name const { // ADD STUFF } bool Student::isOverloaded() // True if can't add any more courses const { // ADD STUFF } void Student::changeHairColor( // Dye student's hair const char* newColor) // New color to give to hair { // ADD STUFF } bool Student::addCourseToSchedule( // Insert course in schedule Course* course) // Course being added { // ADD STUFF } bool Student::removeCourseFromSchedule( // Remove course from schedule Course* course) // Course being removed { // ADD STUFF } ostream& Student::print( // Produce representation of student ostream& targetStream) // Stream to print to const { // ADD STUFF // THIS ROUTINE SHOULD PRODUCE THE FULL STUDENT OUTPUT: NAME, HAIR // COLOR, AND COURSE LIST return targetStream; } void Student::dropAllCourses() // Remove student from all enrollment { // ADD STUFF }