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  int isMinor;
50 
51  int classroom = -1;
52 
53  int slot = -1;
54 
55  public:
56  Course(std::string, unsigned, int, int, int);
57  Course(std::string, unsigned, int, int, int, 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();
67  int getIsMinor();
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:91
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:105
void addProgram(int)
Adds a program that is applicable to the Course.
Definition: course.cpp:64
int getInstructor()
Gets the instructor index of the Course.
Definition: course.cpp:98
Course(std::string, unsigned, int, int, int)
Constructs the Course object.
Definition: course.cpp:19
int getIsMinor()
Gets the &#39;is minor&#39; index of the Course.
Definition: course.cpp:119
bool operator==(const Course &other)
Checks if two Course objects are identical, i.e., if they represent the same Course.
Definition: course.cpp:82
int getSegment()
Gets the segment index of the Course.
Definition: course.cpp:112
unsigned getClassSize()
Gets the class size of the Course.
Definition: course.cpp:134