赞
踩
需求:键盘录入3个学生信息(姓名,语文成绩,数学成绩,英语成绩),按照总分从高到低输出到控制台。
public class Student implements Comparable { private String name; private int chinesePerformance; private int mathPerformance; private int englishResults; private int zongfen; public int getZongfen() { return zongfen; } public void setZongfen(int zongfen) { this.zongfen = zongfen; } public Student() { } public Student(String name, int chinesePerformance, int mathPerformance, int englishResults, int zongfen) { this.name = name; this.chinesePerformance = chinesePerformance; this.mathPerformance = mathPerformance; this.englishResults = englishResults; this.zongfen = zongfen; } public String getName() { return name; } public void setName(String name) {
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。