package _01_继承练习.demo2;

public class Teacher extends Person{
    private int teacherId;
    private String subject;

    public Teacher(int teacherId, String subject) {
//
//        this.teacherId = teacherId;
//        this.subject = subject;
        this("默认名称",10,"男",teacherId,subject);
    }

    public Teacher(String name, int age, String gender, int teacherId, String subject) {
        super(name, age, gender);
        this.teacherId = teacherId;
        this.subject = subject;
    }

    public void showInfo(){
        // 打印父类当中name , age , gender
        super.showInfo();
        System.out.println("子类 teacherId:"+ teacherId + " 学科:"+ subject);
    }
}
