有个差不多的、class Student{
private String name ; private int age ; private float english ; private float computer ; private float math ; public Student(){} public Student(String n,int a,float e,float c,float m){ this.setName(n) ; this.setAge(a) ; this.setEnglish(e) ; this.setComputer(c) ; this.setMath(m) ; } public float sum(){ return english + computer + math ; } public float avg(){ return this.sum() / 3 ; } public float max(){ float max = computer>math?computer:math ; max = max>english?max:english ; return max ; } public float min(){ float min = computer
楼上做的俺都不满意
这是俺给你做的
可惜分么了
代码俺也不给你了
class Stu{
private string name;
private int score[] = new Int[3];
private int max;
public Stu(){};
public Stu(string name){
this.name = name;
}
public void Score(int score[]){
this.score = score;
}
}
累了 不写了
多少给点分哈。
你一分都没有,要是闹哪样啊,