SAS/Course.cpp

32 lines
563 B
C++
Raw Normal View History

2022-07-03 18:22:02 +08:00
#ifndef COURSE_CPP
#define COURSE_CPP
#include<string>
using std::string;
class Course
{
public:
Course() { ; }
Course(string id, string name) {
this->id = id;
this->name = name;
}
string getId() { return id; }
void setId(string id) { this->id = id; }
string getName() { return name; }
void setName(string name) { this->name = name; }
string toString() {
string toStr = "Course{";
toStr += "id='" + id + '\'' +
", name='" + name + '\'' +
'}';
return toStr;
}
private:
string id;//<2F>γ̺<CEB3>
string name;//<2F>γ<EFBFBD><CEB3><EFBFBD>
};
#endif // !COURSE_CPP