summaryrefslogtreecommitdiff
path: root/Course.h
diff options
context:
space:
mode:
Diffstat (limited to 'Course.h')
-rw-r--r--Course.h59
1 files changed, 59 insertions, 0 deletions
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 <string>
+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
+