-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathStudent.java
More file actions
66 lines (55 loc) · 1.32 KB
/
Student.java
File metadata and controls
66 lines (55 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
package entity;//database包
public class Student {//student类
private int ID;//student相关属性
private String name;
private String birDate;
boolean gender;
//全参数构造方法
public Student(int id,String name, String birDate, boolean gender) {
this.ID=id;
this.name = name;
this.birDate = birDate;
this.gender = gender;
}
//获取出生日期
public String getBirDate() {
return birDate;
}
//设置出生日期
public void setBirDate(String birDate) {
this.birDate = birDate;
}
//获取性别
public boolean isGender() {
return gender;
}
//设置性别
public void setGender(boolean gender) {
this.gender = gender;
}
//获取ID
public int getID() {
return ID;
}
//设置ID
public void setID(int ID) {
this.ID = ID;
}
//获取姓名
public String getName() {
return name;
}
//设置姓名
public void setName(String name) {
this.name = name;
}
@Override
public String toString() {
return "Student{" +
"ID=" + ID +
", name='" + name + '\'' +
", birDate='" + birDate + '\'' +
", gender=" + gender +
'}';
}
}