-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStudent.java
40 lines (37 loc) · 891 Bytes
/
Student.java
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
package Codes;
public class Student {
private int stdId;
private String stdname;
private double stdcgpa;
Student()
{
}
Student( int stdId, String stdname, double stdcgpa)
{
this.stdId= stdId;
this.stdname=stdname;
this.stdcgpa=stdcgpa;
}
public void setstdId(int stdId) {
this.stdId = stdId;
}
public void setStdname(String stdname) {
this.stdname = stdname;
}
public void setStdcgpa(double stdcgpa) {
this.stdcgpa = stdcgpa;
}
public int getstdId() {
return stdId;
}
public String getStdname() {
return stdname;
}
public double getStdcgpa() {
return stdcgpa;
}
@Override
public String toString() {
return "\n Student-ID : " +getstdId()+ "\n Student-Name:" + getStdname()+ "\n Student-Cgpa:" +getStdcgpa();
}
}