@Test public void testToString() throws Exception { assertEquals(String.format("CarSimulationResult(configuration=%s, distanceTraveled=%f, crashed=%s, finished=%s)", car, distance, crashed, finished), result.toString()); }
@Override public String toString() { return String.format("CarSimulationResult(configuration=%s, distanceTraveled=%f, crashed=%s" + ", finished=%s)", configuration, distanceTraveled, crashed, finished); }
CarSimulationResult { @Override public String toString() { return String.format("CarSimulationResult(configuration=%s, distanceTraveled=%f, crashed=%s" + ", finished=%s)", configuration, distanceTraveled, crashed, finished); } }
CarSimulationResult { @Override public String toString() { return String.format("CarSimulationResult(configuration=%s, distanceTraveled=%f, crashed=%s" + ", finished=%s)", configuration, distanceTraveled, crashed, finished); } CarSimulationResult(CarConfiguration configuration, double distanceTraveled,
                               boolean crashed, boolean finished); }
CarSimulationResult { @Override public String toString() { return String.format("CarSimulationResult(configuration=%s, distanceTraveled=%f, crashed=%s" + ", finished=%s)", configuration, distanceTraveled, crashed, finished); } CarSimulationResult(CarConfiguration configuration, double distanceTraveled,
                               boolean crashed, boolean finished); CarConfiguration getConfiguration(); double getDistanceTraveled(); boolean hasCrashed(); boolean hasFinished(); CarSimulationResult crash(); CarSimulationResult finish(); CarSimulationResult finishOn(double distance); CarSimulationResult increaseDistance(double delta); boolean equals(Object other); @Override int hashCode(); @Override String toString(); }
CarSimulationResult { @Override public String toString() { return String.format("CarSimulationResult(configuration=%s, distanceTraveled=%f, crashed=%s" + ", finished=%s)", configuration, distanceTraveled, crashed, finished); } CarSimulationResult(CarConfiguration configuration, double distanceTraveled,
                               boolean crashed, boolean finished); CarConfiguration getConfiguration(); double getDistanceTraveled(); boolean hasCrashed(); boolean hasFinished(); CarSimulationResult crash(); CarSimulationResult finish(); CarSimulationResult finishOn(double distance); CarSimulationResult increaseDistance(double delta); boolean equals(Object other); @Override int hashCode(); @Override String toString();  }