class Student {                                               // 父类
    public int stu_no;                                         // 学号
    public String stu_name;                                    // 姓名
    void setStu_no(int no) {
        stu_no = no;
    }
    void setStu_name(String name) {
        stu_name = name;
    }
    public String toString() {                                    // 综合学生信息
        String s;
        s = "学号：" + stu_no + "; 姓名：" + stu_name;
        return s;
    }
}
class GraduateStudent extends Student {                            // 子类
    public String tutor;                                         // 导师
    public String spec_direction;                                 // 研究方向
    void setTutor(String stu_tutor) {
        tutor = stu_tutor;
    }
    void setSpec_direction(String direction) {
        spec_direction = direction;
    }
}
class Example4_1{
    public static void main(String[] args) {
        GraduateStudent stu1 = new GraduateStudent();
        stu1.setStu_no(1001);                                    // 调用父类方法
        stu1.setStu_name("张鸣宇");                              // 调用父类方法
        stu1.setSpec_direction("人工智能");                        // 调用子类方法
        stu1.setTutor("宁鹏飞");                                 // 调用子类方法
        System.out.println(stu1.toString() + ";研究方向：" + stu1.spec_direction+ ";导师:" + stu1.tutor);
    }
}
