-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathStudent.java
More file actions
67 lines (53 loc) · 1.31 KB
/
Student.java
File metadata and controls
67 lines (53 loc) · 1.31 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
67
package SetterVsGetter;
public class Student {
private int sid;
private String sname;
private String schoolName;
private double fee;
private int std;
public Student() {
System.out.println("Student.Student()");
}
public Student(int sid, String sname, String schoolName, double fee, int std) {
this.sid = sid;
this.sname = sname;
this.schoolName = schoolName;
this.fee = fee;
this.std = std;
}
public int getSid() {
return sid;
}
public void setSid(int sid) {
this.sid = sid;
}
public String getSname() {
return sname;
}
public void setSname(String sname) {
this.sname = sname;
}
public String getSchoolName() {
return schoolName;
}
public void setSchoolName(String schoolName) {
this.schoolName = schoolName;
}
public double getFee() {
return fee;
}
public void setFee(double fee) {
this.fee = fee;
}
public int getStd() {
return std;
}
public void setStd(int std) {
this.std = std;
}
@Override
public String toString() {
return "Student [fee=" + fee + ", schoolName=" + schoolName + ", sid=" + sid + ", sname=" + sname + ", std="
+ std + "]";
}
}