Timetabler
course.h
Go to the documentation of this file.
1 
3 #ifndef COURSE_H
4 #define COURSE_H
5 
6 #include <string>
7 #include <vector>
8 #include "fields/instructor.h"
9 #include "fields/is_minor.h"
10 #include "fields/program.h"
11 #include "fields/segment.h"
12 
16 class Course {
17  private:
22  std::string name;
27  unsigned classSize;
32  int instructor;
38  std::vector<int> programs;
43  int segment;
49  MinorType isMinor;
50 
51  int classroom = -1;
52 
53  int slot = -1;
54 
55  public:
56  Course(std::string, unsigned, int, int, MinorType);
57  Course(std::string, unsigned, int, int, MinorType, std::vector<int>);
58  void setPrograms(std::vector<int>);
59  void addProgram(int);
60  void addClassroom(int);
61  void addSlot(int);
62  bool operator==(const Course &other);
63  std::string getName();
64  int getInstructor();
65  std::vector<int> getPrograms();
66  int getSegment();
68  int getClassroom();
69  int getSlot();
70  unsigned getClassSize();
71 };
72 
73 #endif
std::string getName()
Gets the name of the Course.
Definition: course.cpp:97
MinorType getIsMinor()
Gets the &#39;is minor&#39; index of the Course.
Definition: course.cpp:125
Class for a course.
Definition: course.h:16
void setPrograms(std::vector< int >)
Sets the programs for which the Course is applicable.
Definition: course.cpp:55
std::vector< int > getPrograms()
Gets the indices of the programs of the Course.
Definition: course.cpp:111
void addClassroom(int)
Adds a classroom that is applicable to the Course.
Definition: course.cpp:71
void addProgram(int)
Adds a program that is applicable to the Course.
Definition: course.cpp:64
MinorType
Enum to represent the types of "Is Minor".
Definition: is_minor.h:16
int getInstructor()
Gets the instructor index of the Course.
Definition: course.cpp:104
void addSlot(int)
Adds a slot that is applicable to the Course.
Definition: course.cpp:78
bool operator==(const Course &other)
Checks if two Course objects are identical, i.e., if they represent the same Course.
Definition: course.cpp:88
int getSegment()
Gets the segment index of the Course.
Definition: course.cpp:118
unsigned getClassSize()
Gets the class size of the Course.
Definition: course.cpp:146
int getSlot()
Gets the &#39;slot&#39; index of the Course.
Definition: course.cpp:139
int getClassroom()
Gets the &#39;classroom&#39; index of the Course.
Definition: course.cpp:132
Course(std::string, unsigned, int, int, MinorType)
Constructs the Course object.
Definition: course.cpp:19