// Student and Grad Student class header file // Assignment 2 // Dan J Fraser (1219229) #ifndef STUDENT #define STUDENT #include #define NAMELEN 16 #define INTLEN 21 // person class definition class Person { char first_name[NAMELEN]; // first name of student char last_name[NAMELEN]; // last name of student public: Person(char *lastname, char *firstname); // constructor void print(void); // print out the names char *key(void); // for the list template int equal(char *somekey); // for the list template int less_than(char *somekey); // for the list template }; // student class, identical to a person class Student : public Person { public: Student(char *lastname, char *firstname); }; // gradstudent class, identical to a person class GradStudent : public Person { public: GradStudent(char *lastname, char *firstname); }; // we need a dummy attribute to use the association template for grads<->profs class Grad_Attribute { public: void print(void) { }; }; // Professor class, a Person with research interests... class Professor: public Person { char interests[INTLEN]; public: Professor(char *lastname, char *firstname, char *research); void print(void); }; #endif