}
public void setStudentNumber(String studentNumber) {
this.studentNumber = studentNumber;
}
/**
* 课程
*/
class Course{
// 课程名称
protected String courseName;
// 及格分
protected double passMark = 60;
public Course(String courseName, Double passMark) {
this.courseName = courseName;
if ( passMark != null) {
this.passMark = passMark;
}
}
}
/**
* 课程成绩
*/
class CourseResult extends Course{
// 学生成绩
private Double studentScore;
public CourseResult(String courseName, Double studentScore) {
this(courseName, null, studentScore);
}
public CourseResult(String courseName, Double passMark, Double studentScore) {
super(courseName, passMark);
this.studentScore = studentScore == null ? Double.NaN : studentScore;
}
public boolean isPassed(){
return studentScore = passMark;
}
public String getCourseName() {
return courseName;
}
public double getPassMark() {
return passMark;
}
public Double getStudentScore() {
return studentScore;
}
}
【java超级第二关代码 java super】java超级第二关代码的介绍就聊到这里吧 , 感谢你花时间阅读本站内容,更多关于java super、java超级第二关代码的信息别忘了在本站进行查找喔 。
推荐阅读
- 眼影直播稿子素材,眼影直播文案
- sqlserver2008任务计划,sqlserver 定时任务
- 蜜糖冰雪如何营销,冰糖蜜雪加盟
- 索尼电视菜单键黑屏怎么办,索尼电视菜单键失灵
- python捕获函数异常 python捕获错误
- u盘怎么改win7密码,用u盘重改开机密码win7
- 关于thinkphp3.2cache的信息
- 钉钉直播界面找不到人,钉钉直播怎么找不到
- java面试题排序代码 java面试题排序代码怎么写