diff --git a/Course.h b/Course.h new file mode 100644 index 0000000..dfe8583 --- /dev/null +++ b/Course.h @@ -0,0 +1,31 @@ +/* +* 课程表DAO +*/ +#ifndef COURSE_H +#define COURSE_H + +#include +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() { + return id + "\t" + name; + } +private: + string id;//课程号 + string name;//课程名 +}; + +#endif // !COURSE_H \ No newline at end of file diff --git a/CourseDAO.h b/CourseDAO.h index 4354dbe..c05de6a 100644 --- a/CourseDAO.h +++ b/CourseDAO.h @@ -8,7 +8,7 @@ #include #include -#include"Course.cpp" +#include"Course.h" /* * 向数据库添加课程 diff --git a/Grade.cpp b/Grade.h similarity index 92% rename from Grade.cpp rename to Grade.h index eab0573..c7b2a99 100644 --- a/Grade.cpp +++ b/Grade.h @@ -1,8 +1,8 @@ /* * 成绩表DAO */ -#ifndef GRADE_CPP -#define GRADE_CPP +#ifndef GRADE_H +#define GRADE_H #include using std::string; @@ -33,4 +33,4 @@ private: string grade;//成绩 }; -#endif // !GRADE_CPP \ No newline at end of file +#endif // !GRADE_H \ No newline at end of file diff --git a/GradeDAO.h b/GradeDAO.h index d1c08af..d775756 100644 --- a/GradeDAO.h +++ b/GradeDAO.h @@ -8,7 +8,7 @@ #include #include -#include"Grade.cpp" +#include"Grade.h" /* * 向数据库添加成绩 diff --git a/SAS.vcxproj b/SAS.vcxproj index a291431..542136c 100644 --- a/SAS.vcxproj +++ b/SAS.vcxproj @@ -127,25 +127,25 @@ - - - + + + diff --git a/SAS.vcxproj.filters b/SAS.vcxproj.filters index ae1039f..ad61ddc 100644 --- a/SAS.vcxproj.filters +++ b/SAS.vcxproj.filters @@ -18,15 +18,6 @@ 婧愭枃浠 - - 婧愭枃浠 - - - 婧愭枃浠 - - - 婧愭枃浠 - 婧愭枃浠 @@ -71,5 +62,14 @@ 澶存枃浠 + + 澶存枃浠 + + + 澶存枃浠 + + + 澶存枃浠 + \ No newline at end of file diff --git a/Student.cpp b/Student.h similarity index 93% rename from Student.cpp rename to Student.h index bc9d0de..862ed0b 100644 --- a/Student.cpp +++ b/Student.h @@ -1,8 +1,8 @@ /* * 学生表DAO */ -#ifndef STUDENT_CPP -#define STUDENT_CPP +#ifndef STUDENT_H +#define STUDENT_H #include using std::string; @@ -39,4 +39,4 @@ private: string status;//状态(在读、休学、退学) }; -#endif // !STUDENT_CPP \ No newline at end of file +#endif // !STUDENT_H \ No newline at end of file diff --git a/StudentDAO.h b/StudentDAO.h index 7a884a6..1fbee6b 100644 --- a/StudentDAO.h +++ b/StudentDAO.h @@ -8,7 +8,7 @@ #include #include -#include"Student.cpp" +#include"Student.h" /* * 向数据库添加学生