-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStudent231.java
More file actions
61 lines (42 loc) · 1.12 KB
/
Student231.java
File metadata and controls
61 lines (42 loc) · 1.12 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
package com.mycompany.box;
public class Student231 {
private String name;
private int id;
private static int totalStudents = 0;
public Student231(String name, int id) {
this.name = name;
this.id = id;
totalStudents++;
}
public String getEmail() {
// return name;
return name.toLowerCase() +id+"@school.com";
}
public String getName(){
return name;
}
public void setName(String name) {
this.name = name;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public static int getTotalStudents() {
return totalStudents;
}
public static void setTotalStudents(int totalStudents) {
Student231.totalStudents = totalStudents;
}
/**
*
*/
void Displayinfo()
{
System.out.println("Student Name :" +getName());
System.out.println("Student Email:" +getEmail());
System.out.println("Student ID :" +getId());
}
}