Java Simulation Program