From be85ec749ff026e3ba7b721dd7b5c2defc45e570 Mon Sep 17 00:00:00 2001 From: cjwomack <39180413+cjwomack@users.noreply.github.com> Date: Sat, 11 Sep 2021 13:36:49 +1000 Subject: [PATCH 1/2] Changed return type of race to void There's no indication in the examples that TestTrack.race returns anything.... and doesn't make sense given all the other possible return values given the set of other potential return variables all have type int. --- .../remote-control-competition/src/main/java/TestTrack.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/concept/remote-control-competition/src/main/java/TestTrack.java b/exercises/concept/remote-control-competition/src/main/java/TestTrack.java index 499156a4c..48686e783 100644 --- a/exercises/concept/remote-control-competition/src/main/java/TestTrack.java +++ b/exercises/concept/remote-control-competition/src/main/java/TestTrack.java @@ -2,7 +2,7 @@ public class TestTrack { - public static double race(RemoteControlCar car) { + public static void race(RemoteControlCar car) { throw new UnsupportedOperationException("Please implement the (static) TestTrack.race() method"); } From 43da0f642f60fe406373e683dcac14649656e4db Mon Sep 17 00:00:00 2001 From: Jason Runkle Date: Wed, 15 Sep 2021 08:53:47 -0700 Subject: [PATCH 2/2] Change the return type in the exemplar as well --- .../.meta/src/reference/java/TestTrack.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/exercises/concept/remote-control-competition/.meta/src/reference/java/TestTrack.java b/exercises/concept/remote-control-competition/.meta/src/reference/java/TestTrack.java index 0a5c6ecfb..088132928 100644 --- a/exercises/concept/remote-control-competition/.meta/src/reference/java/TestTrack.java +++ b/exercises/concept/remote-control-competition/.meta/src/reference/java/TestTrack.java @@ -4,10 +4,8 @@ public class TestTrack { - public static double race(RemoteControlCar car) { + public static void race(RemoteControlCar car) { car.drive(); - - return car.getDistanceTravelled(); } public static List getRankedCars(ProductionRemoteControlCar prc1,