public class Graduate implements  StudentManageInterface,TeacherManageInterface{
    private String name;
    private int age;
    private String sex;
    private double pay;
    private double fee;


   public  Graduate(String name,int age,String sex,double pay,double fee)
   {
       this.name=name;
       this.age=age;
       this.sex=sex;
       this.pay=pay;
       this.fee=fee;
   }
//ctrl + a全选
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    @Override //用于检查是否正确的重写方法格式
    public double getPay() {
        return pay;
    }

    @Override
    public void setPay(double pay) {
        this.pay = pay;
    }

    @Override
    public double getFee() {
        return fee;
    }

    @Override
    public void setFee(double fee) {
        this.fee = fee;
    }
}
//接口
public interface StudentManageInterface {

        public abstract void setFee(double fee);
        public abstract double getFee();

}
//接口二
public interface TeacherManageInterface {
    public abstract void  setPay(double pay);
    public abstract double  getPay();
}
//实现类
//psvm 快捷生成主函数
public class Text {
    public static void main(String[] args) {
        Graduate yao = new Graduate("张三",23,"男",80000,30000);
        if(yao.getPay()*12- yao.getFee()*12<2000)
        {
            System.out.println("需要贷款");
        }
        else
        {
            System.out.println("不需要贷款");


        }
    }
}