Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. #include "Person.h"
  2.  
  3. class Queue
  4. {
  5. public:
  6.  
  7. int queueID;
  8. bool isOpen;
  9. int waitTime;
  10.  
  11. Staff* staff;
  12. std::list<Customer> queueMembers;
  13.  
  14. void CloseQueue()
  15. {
  16. if (staff->hasQuit)
  17. {
  18. isOpen = false;
  19. waitTime = 999999;//just in case people still try to join it
  20. }
  21. }
  22.  
  23. int GetWaitTime()
  24. {
  25. int wait = 0;
  26.  
  27. for each (Customer customer in queueMembers)
  28. {
  29. wait += customer.serviceTime;//the total wait time of the queue
  30. }
  31.  
  32. return wait;
  33. }
  34.  
  35. Queue();
  36. ~Queue();
  37.  
  38. private:
  39.  
  40. };
  41.  
  42. Queue::Queue()
  43. {
  44. }
  45.  
  46. Queue::~Queue()
  47. {
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement