| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- package exercise.studentSystem;
- /**
- * @author WanJl
- * @version 1.0
- * @title Student
- * @description
- * @create 2026/7/22
- */
- public class Student {
- private int id;
- private String name;
- private double javaScore;
- private double mysqlScore;
- public Student(int id, String name, double javaScore, double mysqlScore) {
- this.id = id;
- this.name = name;
- this.javaScore = javaScore;
- this.mysqlScore = mysqlScore;
- }
- public int getId() {
- return id;
- }
- public void setId(int id) {
- this.id = id;
- }
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
- public double getJavaScore() {
- return javaScore;
- }
- public void setJavaScore(double javaScore) {
- this.javaScore = javaScore;
- }
- public double getMysqlScore() {
- return mysqlScore;
- }
- public void setMysqlScore(double mysqlScore) {
- this.mysqlScore = mysqlScore;
- }
- /**
- * 计算平均分的方法
- * @return
- */
- public double getAverage(){
- return (this.javaScore+this.mysqlScore)/2;
- }
- }
|