Timetabler
course.h
Go to the documentation of this file.
1 
3 #ifndef COURSE_H
4 #define COURSE_H
5 
6 #include "fields/instructor.h"
7 #include "fields/is_minor.h"
8 #include "fields/program.h"
9 #include "fields/segment.h"
10 #include <string>
11 #include <vector>
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  public:
52  Course(std::string, unsigned, int, int, int);
53  Course(std::string, unsigned, int, int, int, std::vector<int>);
54  void setPrograms(std::vector<int>);
55  void addProgram(int);
56  bool operator==(const Course &other);
57  std::string getName();
58  int getInstructor();
59  std::vector<int> getPrograms();
60  int getSegment();
61  int getIsMinor();
62  unsigned getClassSize();
63 };
64 
65 #endif
std::string getName()
Gets the name of the Course.
Definition: course.cpp:83
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:97
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:90
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:111
bool operator==(const Course &other)
Checks if two Course objects are identical, i.e., if they represent the same Course.
Definition: course.cpp:74
int getSegment()
Gets the segment index of the Course.
Definition: course.cpp:104
unsigned getClassSize()
Gets the class size of the Course.
Definition: course.cpp:118