Skip to content

Commit 04744dc

Browse files
cjwomackjmrunkle
andauthored
Changed return type of race to void in TestTrack.java (exercism#2012)
* 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. * Change the return type in the exemplar as well Co-authored-by: Jason Runkle <jmrunkle@gmail.com>
1 parent e1d46b9 commit 04744dc

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

exercises/concept/remote-control-competition/.meta/src/reference/java/TestTrack.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@
44

55
public class TestTrack {
66

7-
public static double race(RemoteControlCar car) {
7+
public static void race(RemoteControlCar car) {
88
car.drive();
9-
10-
return car.getDistanceTravelled();
119
}
1210

1311
public static List<ProductionRemoteControlCar> getRankedCars(ProductionRemoteControlCar prc1,

exercises/concept/remote-control-competition/src/main/java/TestTrack.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
public class TestTrack {
44

5-
public static double race(RemoteControlCar car) {
5+
public static void race(RemoteControlCar car) {
66
throw new UnsupportedOperationException("Please implement the (static) TestTrack.race() method");
77
}
88

0 commit comments

Comments
 (0)