From 1ba0668dbcf5bc4c40d99ac963711e35797c8efa Mon Sep 17 00:00:00 2001 From: Michael Abed Date: Mon, 9 Apr 2012 01:45:23 -0400 Subject: finished assignment --- Course.h | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 Course.h (limited to 'Course.h') diff --git a/Course.h b/Course.h new file mode 100644 index 0000000..fa557d1 --- /dev/null +++ b/Course.h @@ -0,0 +1,59 @@ +#ifndef COURSE_H +#define COURSE_H + +#include +using std::string; + +#include "Student.h" +#include "Teacher.h" + +class Teacher; // "Forward declaration" required for compilation. + +/** + * Course class. + */ +class Course +{ +public: + /** + * Default constructor (aka no-argument constructor). + */ + Course(void); + + /** + * This version of the constructor takes the course name and capacity. + */ + Course(string n, int c); + + /** + * Destructor. + */ + ~Course(void); + + void addTeacher(Teacher *t); + void removeTeacher(void); + void addStudent(Student *s); + void removeStudent(Student *s); + void setName(string n); + + Teacher *getTeacher(void); + int getCapacity(void); + int getEnrollmentNumber(void); + string getName(void); + + void printCourse(void); + + friend class Teacher; + +private: + Teacher *teacher; + static const int DEFAULT_CAPACITY = 100; + int capacity; + int enrollmentNumber; + Student **students; + string name; + +}; // class Course; + +#endif // COURSE_H + -- cgit v1.2.3