-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEmergencyCall_Sec77_G7.java
More file actions
183 lines (149 loc) · 5.2 KB
/
Copy pathEmergencyCall_Sec77_G7.java
File metadata and controls
183 lines (149 loc) · 5.2 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
/**
* Afrah - 1090111
* Aysha - 1088000
* Mehejet - 10
*/
import java.util.Arrays;
public class EmergencyCall_Sec77_G7 implements Comparable<EmergencyCall_Sec77_G7> {
private int callID; // automatically generated
private String phoneNumber; // automatically found using math.random
private String name;
// MAth.random, for x ,y
private String location;
private String startTime;
private String emergencyType; // medical, rescue, fire, accident,
private String urgencyLevel;
private String relatedCallID; // variabe
private Ambulance_Sec77_G7[] ambulancesAssigned;
private String status;
private int callDuration;
private String notes;
// If Related to another call
public EmergencyCall_Sec77_G7(int callID, String phoneNumber, String name, String location, String startTime,
String emergencyType, String urgencyLevel, String relatedCallID, String status, int callDuration,
String notes) {
this.callID = callID;
this.phoneNumber = phoneNumber;
this.name = name;
this.location = location;
this.startTime = startTime;
this.emergencyType = emergencyType;
this.urgencyLevel = urgencyLevel;
this.relatedCallID = relatedCallID;
this.status = status;
this.callDuration = callDuration;
this.notes = notes;
}
// if call ended
public EmergencyCall_Sec77_G7(int callID, String phoneNumber, String name, String location, String startTime,
String emergencyType, String urgencyLevel, Ambulance_Sec77_G7[] ambulancesAssigned, String status, int callDuration,
String notes) {
this.callID = callID;
this.phoneNumber = phoneNumber;
this.name = name;
this.location = location;
this.startTime = startTime;
this.emergencyType = emergencyType;
this.urgencyLevel = urgencyLevel;
this.ambulancesAssigned = ambulancesAssigned;
this.status = status;
this.callDuration = callDuration;
this.notes = notes;
}
@Override
public String toString() {
return callID + ", " + phoneNumber + ", " + name + ", "
+ location + ", " + startTime + ", " + emergencyType + ", "
+ urgencyLevel + ", " + Arrays.toString(ambulancesAssigned) + ", " + status
+ ", " + notes + "]\n";
}
public String relatedCallToString() {
return callID + ", " + phoneNumber + ", " + name + ", "
+ location + ", " + startTime + ", " + emergencyType + ", "
+ urgencyLevel + ", relatedCallID=" + relatedCallID + ", "
+ Arrays.toString(ambulancesAssigned) + ", " + status + ", " + callDuration
+ ", " + notes + "]\n";
}
public String resolvedCalltoString() {
return callID + ", " + phoneNumber + ", " + name + ", " + location + ", " + startTime + ", " + emergencyType + ", "
+ urgencyLevel + ", relatedCallID=" + relatedCallID + ", "
+ Arrays.toString(ambulancesAssigned) + ", " + status + ", " + callDuration
+ ", " + notes + "]\n";
}
public int getCallID() {
return callID;
}
public void setCallID(int callID) {
this.callID = callID;
}
public String getPhoneNumber() {
return phoneNumber;
}
public void setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getLocation() {
return location;
}
public void setLocation(String location) {
this.location = location;
}
public String getStartTime() {
return startTime;
}
public void setStartTime(String startTime) {
this.startTime = startTime;
}
public String getEmergencyType() {
return emergencyType;
}
public void setEmergencyType(String emergencyType) {
this.emergencyType = emergencyType;
}
public String getUrgencyLevel() {
return urgencyLevel;
}
public void setUrgencyLevel(String urgencyLevel) {
this.urgencyLevel = urgencyLevel;
}
public String getRelatedCall() {
return relatedCallID;
}
public void setRelatedCalls(String relatedCallID) {
this.relatedCallID = relatedCallID;
}
public Ambulance_Sec77_G7[] getAmbulancesAssigned() {
return ambulancesAssigned;
}
public void setAmbulancesAssigned(Ambulance_Sec77_G7[] ambulancesAssigned) {
this.ambulancesAssigned = ambulancesAssigned;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public int getCallDuration() {
return callDuration;
}
public void setCallDuration(int callDuration) {
this.callDuration = callDuration;
}
public String getNotes() {
return notes;
}
public void setNotes(String notes) {
this.notes = notes;
}
@Override
public int compareTo(EmergencyCall_Sec77_G7 other) {
return Integer.compare(this.callID, other.callID);
}
}