#include "ins_course_pref.h" InsCoursePref :: InsCoursePref () : course_id(), weight(0) {} InsCoursePref :: InsCoursePref (CourseID& c, int w) : course_id(c), weight(w) {} InsCoursePref :: InsCoursePref (char* n, int no, int w) : course_id(n, no), weight(w) {} InsCoursePref :: InsCoursePref (const InsCoursePref& i) : course_id(i.course_id), weight(i.weight) {} InsCoursePref :: ~InsCoursePref () {} void InsCoursePref :: operator= (const InsCoursePref& i) { course_id = i.course_id; weight = i.weight; } Boolean InsCoursePref :: operator== (const InsCoursePref& i) { return course_id == i.course_id; } void InsCoursePref :: print () const { course_id.print(); printf("%d\n", weight); } Node* InsCoursePref :: copy () const { return new InsCoursePref(*this); } CourseID InsCoursePref :: GetID () const { return course_id; } void InsCoursePref :: SetWeight (int w) { weight = w; } int InsCoursePref :: GetWeight () const { return weight; }