package cn.edu.bjut.chapter4; public class Student extends Person { private String studentId; // 学号 private String classNo; //班级 public Student(String id, String name, char gender, String studentId, String classNo) { super(id, name, gender); this.studentId = studentId; this.classNo = classNo; } public String getStudentId() { return studentId; } public void setStudentId(String studentId) { this.studentId = studentId; } public String getClassNo() { return classNo; } public void setClassNo(String classNo) { this.classNo = classNo; } }