-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAdminManageDoctors.java
More file actions
66 lines (54 loc) · 1.75 KB
/
Copy pathAdminManageDoctors.java
File metadata and controls
66 lines (54 loc) · 1.75 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 com.example.mywebapp;
public class AdminManageDoctors {
private String doctorId;
private String name;
private String specialization;
private int experience; // Ensure experience is stored as an integer for sorting
// Constructor
public AdminManageDoctors(String doctorId, String name, String specialization, int experience) {
this.doctorId = doctorId;
this.name = name;
this.specialization = specialization;
this.experience = experience;
}
// Getters
public String getDoctorId() {
return doctorId;
}
public String getName() {
return name;
}
public String getSpecialization() {
return specialization;
}
public int getExperience() {
return experience;
}
// Setters (optional, if needed)
public void setDoctorId(String doctorId) {
this.doctorId = doctorId;
}
public void setName(String name) {
this.name = name;
}
public void setSpecialization(String specialization) {
this.specialization = specialization;
}
public void setExperience(int experience) {
this.experience = experience;
}
// Convert doctor details to CSV format (for storage)
public String toCSV() {
return doctorId + "," + name + "," + specialization + "," + experience;
}
// String Representation for Debugging
@Override
public String toString() {
return "AdminManageDoctors{" +
"doctorId='" + doctorId + '\'' +
", name='" + name + '\'' +
", specialization='" + specialization + '\'' +
", experience=" + experience +
'}';
}
}