SAS/Student.cpp

46 lines
1.1 KiB
C++
Raw Normal View History

2022-07-03 18:22:02 +08:00
#ifndef STUDENT_CPP
#define STUDENT_CPP
#include<string>
using std::string;
class Student {
public:
Student() { ; }
Student(string id, string name, string sex, string stuClass, string status) {
this->id = id;
this->name = name;
this->sex = sex;
this->stuClass = stuClass;
this->status = status;
}
string getId() { return id; }
void setId(string id) { this->id = id; }
string getName() { return name; }
void setName(string name) { this->name = name; }
string getSex() { return sex; }
void setSex(string sex) { this->sex = sex; }
string getStuClass() { return stuClass; }
void setStuClass(string stuClass) { this->stuClass = stuClass; }
string getStatus() { return status; }
void setStatus(string status) { this->status = status; }
string toString() {
string toStr = "Student{";
toStr += "id='" + id + '\'' +
", name='" + name + '\'' +
", sex='" + sex + '\'' +
", stuClass='" + stuClass + '\'' +
", status='" + status + '\'' +
'}';
return toStr;
}
private:
string id;//ѧ<><D1A7>
string name;//<2F><><EFBFBD><EFBFBD>
string sex;//<2F>Ա<EFBFBD>
string stuClass;//<2F>
string status;//״̬<D7B4><CCAC><EFBFBD>ڶ<EFBFBD><DAB6><EFBFBD><EFBFBD><EFBFBD>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD>ѧ<EFBFBD><D1A7>
};
#endif // !STUDENT_CPP