用JAVA编写一个学生具有如下特征
来源:百度知道 编辑:UC知道 时间:2024/07/01 02:13:53
并在这个基础上提供三个重载的构造函数,要求是一个默认构造函数,一个提供姓名,生日初始化的构造函数,一个提供姓名,生日,成绩,学好初始化的构造函数,为代码可读和维护性,请使用this和setter方式完成第三个构造函数的实现
import java.util.Date;
public class Student {
private static String name;
private static Date birthday;
private static String number;
private static double grade;
private String level;
public Student(){
super();
}
public Student(String name, Date birthday){
this.name = name;
this.birthday = birthday;
}
public Student(String name, Date birthday, String number, double grade){
this(name, birthday);
this.number = number;
this.grade = grade;
}
public static Date getBirthday() {
return birthday;
}
public static void setBirthday(Date birthday) {
Student.birthday = birthday;
}
public static double getGrade() {
return grade;
}
public static void setGrade(double grade) {
Student.grade = grade;
}
public static String