course.cpp (653B)
1 #include "course.hpp" 2 3 Course::Course(const std::string& code, const std::string& cname, 4 const unsigned int csemester) 5 :code(code), cname(cname), csemester(csemester) {} 6 7 Course::Course(const Course& c) 8 :code(c.code), cname(c.cname), csemester(c.csemester) {} 9 10 const std::string& 11 Course::get_code() const 12 { 13 return code; 14 } 15 16 const std::string& 17 Course::get_cname() const 18 { 19 return cname; 20 } 21 22 void 23 Course::set_code(const std::string& code) 24 { 25 this->code = code; 26 } 27 28 void 29 Course::set_cname(const std::string& cname) 30 { 31 this->cname = cname; 32 } 33 34 void 35 Course::set_csemester(unsigned int csemester) 36 { 37 this->csemester = csemester; 38 }