Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I have most of the code for this program but I was looking for help on the rest

ID: 3631739 • Letter: I

Question

I have most of the code for this program but I was looking for help on the rest of these methods for a few classes. The program I am working on is a simulation for wait times in a line.

USE THE CODE I HAVE PROVIDED. Just fill in the empty methods. I'm also getting errors for WaitingCustomerQueue (the methods are finished but I get errors on lines 34, 38, 46)

If you need to see all my code for the whole program it is posted here on pastebin: http://pastebin.com/k1XMXkGT

---------------------------------------------------------------------------------

Explanation / Answer

/* prime2.C only worked for primes less than 10. An undetected overflow caused the program to give bogus answers. We must fix that by computing a^b % n without actually calculating a^b. The idea is to use the following property: (a * b) % n = ((a % n) * (b % n)) % n */ #include #include #include int fermatTest (int n) { int a, result, i; a = rand() % n; cout