You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the Need for Speed's task 6's instruction is out of sync with the analyzer feedback. More specifically, I think it is this one:
Instead of using a loop, consider returning a single expression using the <= operator. You can re-use the other methods already implemented in the class.
The exemplar solution uses a mathematical formula in tryFinishTrack:
publicbooleantryFinishTrack(NeedForSpeedcar) {
thrownewUnsupportedOperationException("Please implement the RaceTrack.tryFinishTrack() method");
}
I no longer get the analyzer feedback when I change to this implementation. But, I think this is inconsistent with the current instructions, as I think it encourages students to continually call drive as per the while loop approach:
6. Check if a remote control car can finish a race
To finish a race, a car has to be able to drive the race's distance. This means not draining its battery before having crossed the finish line. Implement the RaceTrack.tryFinishTrack() method that takes a NeedForSpeed instance as its parameter and returns true if the car can finish the race; otherwise, return false. To see if the car can finish the race, you should try to drive the car until either you reach the end of the track or the battery drains:
Also, note the first point in the hints for task 6:
Remember that the car has a method to retrieve the distance it has driven.
Consider what to do when the battery has been drained before reaching the finish line.
The text was updated successfully, but these errors were encountered:
kahgoh
changed the title
Need for Speed task 6 doesn't match analyzer feedback
Inconsistency between Need for Speed task 6 analyzer feedback and instructions
Feb 25, 2024
Hey @kahgoh thanks for opening an issue, you're right, we modified the reference resolution and built the analyzer so the students try to solve it without using a loop but forgot to change the instructions and hints, if you want to open a PR to fix this, go ahead!
I think the Need for Speed's task 6's instruction is out of sync with the analyzer feedback. More specifically, I think it is this one:
The part of the solution that produces this:
The exemplar solution uses a mathematical formula in
tryFinishTrack
:I no longer get the analyzer feedback when I change to this implementation. But, I think this is inconsistent with the current instructions, as I think it encourages students to continually call
drive
as per the while loop approach:Also, note the first point in the hints for task 6:
The text was updated successfully, but these errors were encountered: