forked from cuonglv1108/assignment2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vaccine.java
73 lines (57 loc) · 1.88 KB
/
Vaccine.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
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
67
68
69
70
71
72
73
package One;
import Two.*;
public class Vaccine {
public enum type_vaccine {
Moderna, Pfizer, AstraZeneca
}
protected static String day1;
protected static String day2;
private type_vaccine type;
public Vaccine() {
}
public Vaccine(String day1, String day2, type_vaccine type) {
this.day1 = day1;
this.day2 = day2;
this.type = type;
}
public String getDay1() {
return day1;
}
public void setDay1(String day1) {
this.day1 = day1;
}
public String getDay2() {
return day2;
}
public void setDay2(String day2) {
this.day2 = day2;
}
public type_vaccine getType() {
return type;
}
public void setType(type_vaccine type) {
this.type = type;
}
public String toString() {
return "Dose1: " + type + ", " + getDay1() + " " + getDay2() + ", type=" + type ;
}
public static int set_time(int year, int month, int day){
if (month < 3) {
year--;
month += 12;
}
return 365*year + year/4 - year/100 + year/400 + (153*month - 457)/5 + day - 306;
}
public static void Clinic(){
CivicAddress c = new CivicAddress("8680 rue Saint Denis", CivicAddress.corresponding.AB,"H2P2H2");
System.out.println(c.toString());
Address test = new Address("cuong","cuonglv","0985001998", c);
WebPageAddress test1 = new WebPageAddress("www.healthcarecentre.com");
EmailAddress test2 = new EmailAddress("[email protected]");
TelecomAddress test3 = new TelecomAddress("0912343223");
// System.out.println(test1.toString());
// System.out.println(test2.toString());
// System.out.println(test3);
System.out.println(test.toString());
}
}