-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPatient.java
More file actions
45 lines (30 loc) · 1.03 KB
/
Patient.java
File metadata and controls
45 lines (30 loc) · 1.03 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
public class Patient extends Person implements Service {
private Appointment[] appointment;
public Patient(Appointment[] appointment, String FirstName, String LastName, int Id, int Age, Date BirthDate, char Gender) {
super(FirstName, LastName, Id, Age, BirthDate, Gender);
this.appointment = appointment;
}
public Patient() {
this(null, null, null, 0, 0, null, ' ');
}
public Appointment[] getAppointment() {
return appointment;
}
public void setAppointment(Appointment[] appointment) {
this.appointment = appointment;
}
@Override
public void NameOfClass(){
System.out.println(this.getClass().getSimpleName());
}
@Override
public String toString(){
return super.toString()+"appointment: "+appointment;
}
@Override
public void display() {
for (Appointment appointment1 : appointment) {
System.out.println("Array info:\n"+appointment1);
}
}
}