-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAppointment.java
More file actions
37 lines (28 loc) · 881 Bytes
/
Appointment.java
File metadata and controls
37 lines (28 loc) · 881 Bytes
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
public class Appointment {
protected static int countPatient = 0;
private Date DateAppointment;
public Appointment(int numPatient, Date DateAppointment) {
this.DateAppointment = DateAppointment;
countPatient++;
}
public Appointment() {
this(0, null);
}
public static int getCountPatient() {
return countPatient;
}
public static void setCountPatient(int countPatient) {
Appointment.countPatient = countPatient;
}
public Date getDateAppointment() {
return DateAppointment;
}
public void setDateAppointment(Date DateAppointment) {
this.DateAppointment = DateAppointment;
}
@Override
public String toString() {
return String.format("Number of patient: %d %n Appointment:%n %s ",
countPatient, DateAppointment.toString());
}
}