package _02_继承._05_继承构造方法;

public class Student extends Person {
    private double score;

    public double getScore() {
        return score;
    }

    public void setScore(double score) {
        this.score = score;
    }

    public Student() {
        //super()
        // 默认在子类的构造方法的第一行会有super() 调用父类的无参数构造器
        System.out.println("这是子类的无参数构造器");

    }

    public Student(double score) {
        System.out.println("这是子类的有参数构造器");
        this.score = score;
    }


    public Student(String name,int age,double score) {
        super(name,age);   // 调用是父类有参构造防范帮我们去完成name 和age 属性初始化
        this.score = score;
    }
}
