其他分享
首页 > 其他分享> > student

student

作者:互联网

public class Student extends Person {//学生继承Person
public static int count = 0;
private String studentId;
private String mclass;

public Student() {
super();
count++;
}
public Student(String name) {
super(name);
count++;
}

public Student(String name, String sex, int age, String address, String birthDay,String studentId,String mclass) {
super(name, sex, age, address, birthDay);
this.studentId = studentId;
this.mclass = mclass;
count++;
}

public String getStudentId() {
return studentId;
}
public void setStudentId(String studentId) {
this.studentId = studentId;
}
public String getMclass() {
return mclass;
}
public void setMclass(String mclass) {
this.mclass = mclass;
}

@Override
public String toString() {
return name + “是一个” + sex +“生, Ta已经” + age + “了, Ta出生在” + birthDay + “,Ta家住在” + address

标签:studentId,mclass,String,student,Ta,public,name
来源: https://blog.csdn.net/qq_63908714/article/details/121483413