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/program.h"
10 #include "fields/segment.h"
11 #include "fields/is_minor.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 public:
51  Course(std::string, unsigned, int, int, int);
52  Course(std::string, unsigned, int, int, int, std::vector<int>);
53  void setPrograms(std::vector<int>);
54  void addProgram(int);
55  bool operator==(const Course &other);
56  std::string getName();
57  int getInstructor();
58  std::vector<int> getPrograms();
59  int getSegment();
60  int getIsMinor();
61  unsigned getClassSize();
62 };
63 
64 #endif
std::string getName()
Gets the name of the Course.
Definition: course.cpp:85
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:103
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:94
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:121
bool operator==(const Course &other)
Checks if two Course objects are identical, i.e., if they represent the same Course.
Definition: course.cpp:76
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:130