// Assignment 2 // Course class implementation file // Dan Fraser (1219229) #include "course.h" #include #include // constructor Course::Course(char *courseid, char *coursetitle) { strcpy(course_id,courseid); strcpy(course_title,coursetitle); } // print the course code and title void Course::print(void) { cout << course_id << ": " << course_title; }; // return key value (for list template) char *Course::key(void) { return course_id; } //compare key with given value (for list template) int Course::less_than(char *somekey) { return (strcasecmp(somekey,course_id) > 0); } // for the list template int Course::equal(char *somekey) { return (strcasecmp(somekey,course_id) == 0); } // change a mark void Mark::change(int my_mark) { mark = my_mark; } // print a mark void Mark::print(void) { cout << mark; }