hi every body
can any one help how to start with this project
using the c++ ADT class ,write aprogram that simulates the operation
of telephone system that might be found in asmall business,
such as your local pizza parlor.Only one person can answer
the phone(aingle server queue).
but there can be an unlimited number of calls waiting to be answered.
Queue analysis consider two primary elements, the length of time
a requester waits for service(the queue wait time -in this case)
the customer calling the pizza) and the service time
(thr time it takes the customer to place the order).
Your program will require two inputsto run the simulation:
(1)the length of time in hours that the service will be provided.
(2)the maximum time, it takes for the operator to take an order
(the maximum service time) .
4 element are required to run the simulation:
1. Timing loop:
every iteration of the loop will be conseder 1 min in real time.
the loop will continue until the service has been in operation the requisted amount of time. when the operating period is complete,how ever,the timing has the follwing subfunctions:
a.datermine wether a call was recieved
b. process active call.
c. start new call.
2. call simulator:
it will use a random num. generator to detemine whether a call has been recieved.Scale random numberto an appropriate range,such as 1 to 10.
The random num. should be compared with a define constant .If the value is < const. ,a call was received ;if it's not,then no call was received.
for the simulation set tje call level 50%,on the average.
a call will received every 2 min. , if a call is recieved ,place it in a queue.
3. process active call:
if acall is active ,test whether it has been completed, if completed print the statistics for the current call and gather the necessary statistics
for the end of the job report.
4.start new call:
if there are no active calls, start new call, if there is one waiting in the queue .Note that starting a call must calculate the time the call has been waiting.
/* sample queue output
ColckTime CallNumber ArrivalTime WaitTime startTime ServiceTims QueueSize
4 1 2 0 2 3 2
6 2 3 2 5 2 4
If anyone has any suggestions I would really appreciate it