course.hpp (804B)
1 #ifndef COURSE_HPP 2 #define COURSE_HPP 3 4 #include <iostream> 5 #include <string> 6 7 class Course 8 { 9 private: 10 std::string code; // Course code 11 std::string cname; // Course name 12 unsigned int csemester; // Corresponding semester of course 13 14 public: 15 Course() = default; 16 Course(const std::string& code, const std::string& cname, 17 const unsigned int csemester); 18 Course(const Course& s); 19 20 const std::string& get_code() const; 21 const std::string& get_cname() const; 22 constexpr unsigned int get_csemester() const {return csemester;} 23 24 void set_code(const std::string& code); 25 void set_cname(const std::string& cname); 26 void set_csemester(const unsigned int csemester); 27 }; 28 29 #endif /* COURSE_HPP */