-
-
Notifications
You must be signed in to change notification settings - Fork 685
Description
Couple if issues with this exercise:
-
Introduction section doesn't have an example for returning a pointer to struct
-
NewCar Function:
- Tests are not using it.
- Instructions don't have any information on it, even though it's being used in the code block of all tasks.
-
All methods have to be implemented to see the result of the test suite. This may be the only exercise where this happens. In other exercises, test suite results can be seen by implementing one function.
-
Task 1 hint: "Add a field to the Car struct that keeps track of the driven distance" is not needed because the
distancefield is already present in the Car struct. (It's not possible to editcar.go. Can you confirm if you're able to do so, and this is my browser's issue?) -
Task 2 code block output should be
// Output: "Driven 5 meters".This is inconsistent with the code block for task 1 which does the same thing - initializes
NewCar(speed, batteryDrain)with values 5 and 2 respectively - and outputs// car is now Car{speed: 5, batteryDrain: 2, battery: 98, distance: 5}Near the beginning of the instructions, its stated that:
Cars start with full (100%) batteries. Each time you drive the car using the remote control, it covers the car's speed in meters and decreases the remaining battery percentage by its battery drain.
If a car's battery is below its battery drain percentage, you can't drive the car anymore.
This means that the hint should also be "Compute the value of the distance field" instead of "Show the value of the distance field"
-
Similarly in task 3, the code block output should be
// Output: "Battery at 98%" -
Additional hints for task 4, similar to
need-for-speedlearning exercise's task 4 hints (bullet points 3 and 4)