Simulations play a variety of roles in science in general and computer science in particular.
As we develop the program we will explore the use of random numbers in simulation. Set or input values for the variables at some initial point in time. Loop until some criteria for stopping the simulation is satisfied Calculate changes in the values of the variables after an increment of time has passed, using known relationships between them. Output the values of the variables at this particular point in time. In writing a simulation program we focus first on the variables that describe the system, then on the relationships between the variables, and finally on the passage of time and criteria for stopping the simulation.