Student类:
package passage; public class Student { private String StuID; private String StuName; private String sex; private String College; private String Professionals; private String Phone; private String Position; public String getStuID() { return StuID; } public void setStuID(String stuID) { StuID = stuID; } public String getStuName() { return StuName; } public void setStuName(String stuName) { StuName = stuName; } public String getSex() { return sex; } public void setSex(String sex) { this.sex = sex; } public String getCollege() { return College; } public void setCollege(String college) { College = college; } public String getProfessionals() { return Professionals; } public void setProfessionals(String professionals) { Professionals = professionals; } public String getPhone() { return Phone; } public void setPhone(String phone) { Phone = phone; } public String getPosition() { return Position; } public void setPosition(String position) { Position = position; } public Student(String stuID, String stuName, String sex, String college, String professionals, String phone, String position) { super(); StuID = stuID; StuName = stuName; this.sex = sex; College = college; Professionals = professionals; Phone = phone; Position = position; } }
Teacher类:
package passage; public class Teacher { private String TeacherID; private String Name; private String College; private String Professionals; private String Role; public String getTeacherID() { return TeacherID; } public void setTeacherID(String teacherID) { TeacherID = teacherID; } public String getName() { return Name; } public void setName(String name) { Name = name; } public String getCollege() { return College; } public void setCollege(String college) { College = college; } public String getProfessionals() { return Professionals; } public void setProfessionals(String professionals) { Professionals = professionals; } public String getRole() { return Role; } public void setRole(String role) { Role = role; } public Teacher(String teacherID, String name, String college, String professionals, String role) { super(); TeacherID = teacherID; Name = name; College = college; Professionals = professionals; Role = role; } }
Card类:
package passage; public class Card { private String CardId; private String CardData; private String CourseName; private String CourseTeacher; private String CourseID; private String CourseNature; private String Credit; private String CourseClass; private String CourseMajor; private String TestWay; private String TestData; private String TestCount; private String TestMethod; private String TestGrade; private String TestEvaluation; private String TestAnalysis; private String Professional; private String ProfessionalConclusion; private String Reasonable; private String ReasonableConclusion; private String AuditStatus; public String getCardId() { return CardId; } public void setCardId(String cardId) { CardId = cardId; } public String getCardData() { return CardData; } public void setCardData(String cardData) { CardData = cardData; } public String getCourseName() { return CourseName; } public void setCourseName(String courseName) { CourseName = courseName; } public String getCourseTeacher() { return CourseTeacher; } public void setCourseTeacher(String courseTeacher) { CourseTeacher = courseTeacher; } public String getCourseID() { return CourseID; } public void setCourseID(String courseID) { CourseID = courseID; } public String getCourseNature() { return CourseNature; } public void setCourseNature(String courseNature) { CourseNature = courseNature; } public String getCredit() { return Credit; } public void setCredit(String credit) { Credit = credit; } public String getCourseClass() { return CourseClass; } public void setCourseClass(String courseClass) { CourseClass = courseClass; } public String getCourseMajor() { return CourseMajor; } public void setCourseMajor(String courseMajor) { CourseMajor = courseMajor; } public String getTestWay() { return TestWay; } public void setTestWay(String testWay) { TestWay = testWay; } public String getTestData() { return TestData; } public void setTestData(String testData) { TestData = testData; } public String getTestCount() { return TestCount; } public void setTestCount(String testCount) { TestCount = testCount; } public String getTestMethod() { return TestMethod; } public void setTestMethod(String testMethod) { TestMethod = testMethod; } public String getTestGrade() { return TestGrade; } public void setTestGrade(String testGrade) { TestGrade = testGrade; } public String getTestEvaluation() { return TestEvaluation; } public void setTestEvaluation(String testEvaluation) { TestEvaluation = testEvaluation; } public String getTestAnalysis() { return TestAnalysis; } public void setTestAnalysis(String testAnalysis) { TestAnalysis = testAnalysis; } public String getProfessional() { return Professional; } public void setProfessional(String professional) { Professional = professional; } public String getProfessionalConclusion() { return ProfessionalConclusion; } public void setProfessionalConclusion(String professionalConclusion) { ProfessionalConclusion = professionalConclusion; } public String getReasonable() { return Reasonable; } public void setReasonable(String reasonable) { Reasonable = reasonable; } public String getReasonableConclusion() { return ReasonableConclusion; } public void setReasonableConclusion(String reasonableConclusion) { ReasonableConclusion = reasonableConclusion; } public String getAuditStatus() { return AuditStatus; } public void setAuditStatus(String auditStatus) { AuditStatus = auditStatus; } public Card(String cardId, String cardData, String courseName, String courseTeacher, String courseID, String courseNature, String credit, String courseClass, String courseMajor, String testWay, String testData, String testCount, String testMethod, String testGrade, String testEvaluation, String testAnalysis, String professional, String professionalConclusion, String reasonable, String reasonableConclusion, String auditStatus) { super(); CardId = cardId; CardData = cardData; CourseName = courseName; CourseTeacher = courseTeacher; CourseID = courseID; CourseNature = courseNature; Credit = credit; CourseClass = courseClass; CourseMajor = courseMajor; TestWay = testWay; TestData = testData; TestCount = testCount; TestMethod = testMethod; TestGrade = testGrade; TestEvaluation = testEvaluation; TestAnalysis = testAnalysis; Professional = professional; ProfessionalConclusion = professionalConclusion; Reasonable = reasonable; ReasonableConclusion = reasonableConclusion; AuditStatus = auditStatus; } }
链接工具:Tool类:
package tool; import java.sql.*; public class Tool { private static Connection connection; private static String url="jdbc:mysql://localhost:3306/TEACH?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=UTC"; private static String user="root"; private static String pass="020907"; static { try { Class.forName("com.mysql.cj.jdbc.Driver"); }catch(ClassNotFoundException e){ e.printStackTrace(); } } public static Connection getConnection() { try { connection=DriverManager.getConnection(url,user,pass); }catch(SQLException e) { e.printStackTrace(); } return connection; } public static void release(Connection connection,Statement statement,ResultSet resultSet) { try { if(connection!=null) { connection.close(); } if(statement!=null) { statement.close(); } if(resultSet!=null) { resultSet.close(); } } catch(SQLException e) { e.printStackTrace(); } } }
标签:return,定义,void,基础,private,sex,public,考试,String From: https://www.cnblogs.com/syhxx/p/17004069.html