/*************************************************************************/ /* File: ins_course_pref.h Author: B. De Hamer */ /* */ /* InsCoursePref class holds one course preference for an instructor */ /* and the weight of that preference. */ /*************************************************************************/ #ifndef INS_COURSE_PREF #define INS_COURSE_PREF #include "node.h" #include "course_id.h" typedef int CoursePrefLevel ; class InsCoursePref : public Node { public: InsCoursePref () ; // Construct a new InsCoursePref InsCoursePref (CourseID&, int) ; // Construct a new preference with the given class and weight InsCoursePref (char*, int, int) ; // Construct a course preference for the given class name/number // and weight InsCoursePref (const InsCoursePref&) ; // Construct a new InsCoursePref from an existing one ~InsCoursePref () ; // Destruct the InsCoursePref void operator= (const InsCoursePref&) ; // Assign this preference the value of the argument Boolean operator== (const InsCoursePref&) ; // Compres this preference to the argument // Reutrns true if they are equal // Returns false if they are not equal void print () const ; // Print the course preference Node* copy () const ; // Return a pointer to an exact copy of this object CourseID GetID () const ; // Returns the course if of the current preference void SetWeight (int) ; // Set the weight of this preference int GetWeight () const ; // Returns the weight of this preference protected: CourseID course_id ; // Course name CoursePrefLevel weight; // Weight of preference } ; #endif