Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "Person.h"
- class Queue
- {
- public:
- int queueID;
- bool isOpen;
- int waitTime;
- Staff* staff;
- std::list<Customer> queueMembers;
- void CloseQueue()
- {
- if (staff->hasQuit)
- {
- isOpen = false;
- waitTime = 999999;//just in case people still try to join it
- }
- }
- int GetWaitTime()
- {
- int wait = 0;
- for each (Customer customer in queueMembers)
- {
- wait += customer.serviceTime;//the total wait time of the queue
- }
- return wait;
- }
- Queue();
- ~Queue();
- private:
- };
- Queue::Queue()
- {
- }
- Queue::~Queue()
- {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement