|
|
|
|
@ -0,0 +1,35 @@
|
|
|
|
|
package com.ssm.di.xml;
|
|
|
|
|
|
|
|
|
|
// 成绩实体类 DI XML版
|
|
|
|
|
public class Score {
|
|
|
|
|
private Integer scoreId;
|
|
|
|
|
private Integer studentId;
|
|
|
|
|
private Double score;
|
|
|
|
|
|
|
|
|
|
public Score() {}
|
|
|
|
|
|
|
|
|
|
public Integer getScoreId() { return scoreId; }
|
|
|
|
|
public void setScoreId(Integer scoreId) { this.scoreId = scoreId; }
|
|
|
|
|
public Integer getStudentId() { return studentId; }
|
|
|
|
|
public void setStudentId(Integer studentId) { this.studentId = studentId; }
|
|
|
|
|
public Double getScore() { return score; }
|
|
|
|
|
public void setScore(Double score) { this.score = score; }
|
|
|
|
|
|
|
|
|
|
// 重写toString
|
|
|
|
|
@Override
|
|
|
|
|
public String toString() {
|
|
|
|
|
return "Score{" +
|
|
|
|
|
"成绩ID=" + scoreId +
|
|
|
|
|
", 学生学号=" + studentId +
|
|
|
|
|
", 考试分数=" + score +
|
|
|
|
|
'}';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// printInfo方法
|
|
|
|
|
public void printInfo() {
|
|
|
|
|
System.out.println("\n===== 成绩信息 =====");
|
|
|
|
|
System.out.println("成绩ID:" + scoreId);
|
|
|
|
|
System.out.println("学生学号:" + studentId);
|
|
|
|
|
System.out.println("考试分数:" + score);
|
|
|
|
|
}
|
|
|
|
|
}
|