// you should not need to change this class import java.io.PrintStream; public class Simulator { private PhysicsElement[] elements = null; private PrintStream out; public Simulator(){ out = System.out; }; public Simulator(PrintStream out) { this.out = out; }; public Simulator (PrintStream out, PhysicsElement[] e){ this.out = out; elements = e; }; public void setPhysicsElements ( PhysicsElement[] e){ elements = e; } private void printSystemHeaders() { if (elements == null) return; out.print("time,"); for (int i=0; i= samplingTime) { // decide if it is time to print state printSystemState(t); samplingTime += deltaSample; } for (int i=0; i