项目结构整理,bean对象转为h文件
This commit is contained in:
parent
0ddf037a96
commit
fc3e710d50
31
Course.h
Normal file
31
Course.h
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* ¿Î³Ì±íDAO
|
||||||
|
*/
|
||||||
|
#ifndef COURSE_H
|
||||||
|
#define COURSE_H
|
||||||
|
|
||||||
|
#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() {
|
||||||
|
return id + "\t" + name;
|
||||||
|
}
|
||||||
|
private:
|
||||||
|
string id;//¿Î³ÌºÅ
|
||||||
|
string name;//¿Î³ÌÃû
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // !COURSE_H
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
#include<iostream>
|
#include<iostream>
|
||||||
#include<vector>
|
#include<vector>
|
||||||
#include"Course.cpp"
|
#include"Course.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 向数据库添加课程
|
* 向数据库添加课程
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* 成绩表DAO
|
* 成绩表DAO
|
||||||
*/
|
*/
|
||||||
#ifndef GRADE_CPP
|
#ifndef GRADE_H
|
||||||
#define GRADE_CPP
|
#define GRADE_H
|
||||||
|
|
||||||
#include<string>
|
#include<string>
|
||||||
using std::string;
|
using std::string;
|
||||||
@ -33,4 +33,4 @@ private:
|
|||||||
string grade;//成绩
|
string grade;//成绩
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // !GRADE_CPP
|
#endif // !GRADE_H
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
#include<iostream>
|
#include<iostream>
|
||||||
#include<vector>
|
#include<vector>
|
||||||
#include"Grade.cpp"
|
#include"Grade.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 向数据库添加成绩
|
* 向数据库添加成绩
|
||||||
|
@ -127,25 +127,25 @@
|
|||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="Course.cpp" />
|
|
||||||
<ClCompile Include="CourseDAOImpl.cpp" />
|
<ClCompile Include="CourseDAOImpl.cpp" />
|
||||||
<ClCompile Include="DBCUtils.cpp" />
|
<ClCompile Include="DBCUtils.cpp" />
|
||||||
<ClCompile Include="Grade.cpp" />
|
|
||||||
<ClCompile Include="GradeDAOImpl.cpp" />
|
<ClCompile Include="GradeDAOImpl.cpp" />
|
||||||
<ClCompile Include="main.cpp" />
|
<ClCompile Include="main.cpp" />
|
||||||
<ClCompile Include="Menu.cpp" />
|
<ClCompile Include="Menu.cpp" />
|
||||||
<ClCompile Include="MenuUtils.cpp" />
|
<ClCompile Include="MenuUtils.cpp" />
|
||||||
<ClCompile Include="StringUtils.cpp" />
|
<ClCompile Include="StringUtils.cpp" />
|
||||||
<ClCompile Include="Student.cpp" />
|
|
||||||
<ClCompile Include="StudentDAOImpl.cpp" />
|
<ClCompile Include="StudentDAOImpl.cpp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<ClInclude Include="Course.h" />
|
||||||
<ClInclude Include="CourseDAO.h" />
|
<ClInclude Include="CourseDAO.h" />
|
||||||
<ClInclude Include="DBCUtils.h" />
|
<ClInclude Include="DBCUtils.h" />
|
||||||
|
<ClInclude Include="Grade.h" />
|
||||||
<ClInclude Include="GradeDAO.h" />
|
<ClInclude Include="GradeDAO.h" />
|
||||||
<ClInclude Include="Menu.h" />
|
<ClInclude Include="Menu.h" />
|
||||||
<ClInclude Include="MenuUtils.h" />
|
<ClInclude Include="MenuUtils.h" />
|
||||||
<ClInclude Include="StringUtils.h" />
|
<ClInclude Include="StringUtils.h" />
|
||||||
|
<ClInclude Include="Student.h" />
|
||||||
<ClInclude Include="StudentDAO.h" />
|
<ClInclude Include="StudentDAO.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
@ -18,15 +18,6 @@
|
|||||||
<ClCompile Include="main.cpp">
|
<ClCompile Include="main.cpp">
|
||||||
<Filter>源文件</Filter>
|
<Filter>源文件</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="Student.cpp">
|
|
||||||
<Filter>源文件</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="Course.cpp">
|
|
||||||
<Filter>源文件</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="Grade.cpp">
|
|
||||||
<Filter>源文件</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="DBCUtils.cpp">
|
<ClCompile Include="DBCUtils.cpp">
|
||||||
<Filter>源文件</Filter>
|
<Filter>源文件</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@ -71,5 +62,14 @@
|
|||||||
<ClInclude Include="StringUtils.h">
|
<ClInclude Include="StringUtils.h">
|
||||||
<Filter>头文件</Filter>
|
<Filter>头文件</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="Course.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Student.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Grade.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
@ -1,8 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* 学生表DAO
|
* 学生表DAO
|
||||||
*/
|
*/
|
||||||
#ifndef STUDENT_CPP
|
#ifndef STUDENT_H
|
||||||
#define STUDENT_CPP
|
#define STUDENT_H
|
||||||
|
|
||||||
#include<string>
|
#include<string>
|
||||||
using std::string;
|
using std::string;
|
||||||
@ -39,4 +39,4 @@ private:
|
|||||||
string status;//状态(在读、休学、退学)
|
string status;//状态(在读、休学、退学)
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // !STUDENT_CPP
|
#endif // !STUDENT_H
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
#include<iostream>
|
#include<iostream>
|
||||||
#include<vector>
|
#include<vector>
|
||||||
#include"Student.cpp"
|
#include"Student.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 向数据库添加学生
|
* 向数据库添加学生
|
||||||
|
Loading…
x
Reference in New Issue
Block a user