-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestER.cpp
More file actions
34 lines (28 loc) · 795 Bytes
/
TestER.cpp
File metadata and controls
34 lines (28 loc) · 795 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
/*Author: Karanbir Singh
TestCode for an Emergency Room waitlist, the patients will be placed according to their priorities*/
#include <iostream>
#include <string>
#include "ERWL.h"
using namespace std;
int main(){
Patient p1("Anthony" , 2);
Patient p2("Peter" , 1);
Patient p3("Charlie", 1);
Patient p4("Julio",1);
Patient p5("Victor",2);
ERWL Er;
Er.enqueuePatient(p1);
Er.enqueuePatient(p2);
Er.enqueuePatient(p3);
Er.enqueuePatient(p4);
Er.enqueuePatient(p5);
Er.waitList();
cout << "After treating one patient..."<<endl;
Er.dequeuePatient();
Er.waitList();
cout << "After treating two patients..."<<endl;
Er.dequeuePatient();
Er.waitList();
return 0;
}
//running code: g++ -pedantic -Wall -Wextra -std=c++14 TestER.cpp -o TestER