I\'m trying to write simulation program for waiting in a line. I have most of th
ID: 3631911 • Letter: I
Question
I'm trying to write simulation program for waiting in a line. I have most of the classes coded (minus some empty methods in a couple) and some pseudo code for the main program written. I'm looking for help filling in the empty methods and writing the program using the pseudo code.
I have all the code posted on pastebin: http://pastebin.com/k1XMXkGT
This is the pseudo code:
// Simulation Pseudo Code
public class SimulationProgram
{
//member variables
private static int simulationTime;
private static int numberOfServers;
private static int transactionTime;
private static double arrivalProbability;
create customer wait queue
create server list -- specify # of servers
foreach( clock time unit )
{
update servers
update customer wait queue
if( customer arrives )
{
create customer record
( cust#, clock, waitTime=0, transactTime )
add customer to wait queue
}
if( free server )
{
remove customer from wait queue
add customer to server
}
generate statistics report
}//end foreach
}//end class SimulationProgram