Student类
public class Student {
/*
* 最好是私有属性
*/
int xuehao;//学号
String name;//姓名
int english;//英语成绩
int math;//高数成绩
int PE;//体育成绩
public int getXuehao() {
return xuehao;
}
public void setXuehao(int xuehao) {
this.xuehao = xuehao;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getEnglish() {
return english;
}
public void setEnglish(int english) {
this.english = english;
}
public int getMath() {
return math;
}
public void setMath(int math) {
this.math = math;
}
public int getPE() {
return PE;
}
public void setPE(int pE) {
PE = pE;
}
/*构造方法
* 作用:初始化
*
*
**/
public Student(int xuehao,String name,int english,int Math, int PE){
this.xuehao=xuehao;
this.name=name;
this.english=english;
this.math=Math;
this.PE=PE;
}
/*
* 打印学生信息的方法
*/
public void Print(){
System.out.println("我的名字是:"+name+" "+
"我的学号是:"+xuehao+" "+
"我的英语成绩是:"+english+" "+
"我的数学成绩是:"+math+" "+
"我的体育成绩是:"+PE);
}
}
public class Student {
/*