public class Student{
//字段的定义
private String _number; //学号
private String _name; //姓名
private int _age; //年龄
private boolean _sex; //性别
private double _score; //成绩
public Student(String number,String name,int age,boolean sex,double score){
//构造方法
this._number = number;
this._name = name;
this._age = age;
this._sex = sex;
this._score = score;
}
public void show(){
//输出
System.out.println( "学号: " + _number);
System.out.println( "姓名: " + _name);
System.out.println( "年龄: " + _age);
System.out.println( "性别: " + _sex);
System.out.println( "成绩: " + _score);
}
public static void main(String[] args){
Student st = new Student( "0001 ", "kog ",25,true,88.7);
st.show();
}
}
现要求定义一个Student的子类 &n