import java.util.*; import java.io.*; public class MyWorld { private PrintStream out; private ArrayList elements; // array to hold everything in my world. public MyWorld(){ this(System.out); // delta_t= 0.1[ms] and refreshPeriod=200 [ms] } public MyWorld(PrintStream output){ out = output; elements = new ArrayList(); } public void addElement(PhysicsElement e) { elements.add(e); } public void printStateDescription(){ String s ="Time "; for (PhysicsElement e:elements) s+=" \t"+e.getDescription() ; out.println(s); } public void printState(double t){ // to be coded by you String s = " "+t; for (PhysicsElement e:elements) s+=" \t"+e.getState(); out.println(s); } public void simulate (double delta_t, double endTime, double samplingTime) { // simulate passing time double t=0; printStateDescription(); printState(t); while (t