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); } public MyWorld(PrintStream output){ out = output; elements = new ArrayList(); } public void addElement(PhysicsElement e) { elements.add(e); } public void printStateDescription(){ String s ="Time\t"; for (PhysicsElement e:elements) s+=e.getDescription() + "\t"; 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