作业帮 > 综合 > 作业

(1) 定义一个score类,其中包括私有数据成员和公有成员函数,即 num 学号 Math 高等数学成绩 Englis

来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/04/27 19:27:20
(1) 定义一个score类,其中包括私有数据成员和公有成员函数,即 num 学号 Math 高等数学成绩 English 英语
public class Score {
private int num;
private float math;
private float english;
public float getMath(){
return math;
}
public void setMath(float math){
this.math=math;
}
public float getEnglish(){
return english;
}
public void setEnglish(float english){
this.english=english;
}
}