Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update instructions.md #2128

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions exercises/concept/need-for-speed/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

In this exercise you'll be organizing races between various types of remote controlled cars. Each car has its own speed and battery drain characteristics.

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.
Cars start with full (100%) batteries. Each time you drive the car using the remote control, it increases the car's speed in meters per second and decreases the remaining battery percentage by its battery drain.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To me this reads as: the speed is increased, which it isn't. I like the other two suggestions, but maybe change or revert this?

Copy link
Author

@jxbrenner jxbrenner May 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, increases the speed doesn't make sense if the car is already travelling. How about, "it causes the car to travel at its rated speed for 1 second and decreases the remaining battery percentage by its battery drain rate."? It's wordier but I think it helps lead the reader to distanceTravelled = speed * time.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, there is no time in this exercise, the speed is in distance per click of a button, not per unit of time.
How about

"Every time you drive the car using the remote control, the car travels distance equal to its current speed and its battery level drop by the the value of battery drain." Or something like this?

Copy link
Author

@jxbrenner jxbrenner May 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Distance per press of a button is just distance. But the exercise is full of references to speed, and anywhere you talk about speed, you infer time by the definition of speed. My suggestion is either:

  • replace all references to speed to distance travelled per use of the remote control, or
  • define the amount of time the car travels at rated speed per use of the remote control so you have the information you need to convert rated speed to distance travelled, ex. _totalDistance += _speed * 1; if the operating the remote control causes the car to travel at its rated speed for 1 second

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Every time you drive the car using the remote control, the car travels distance equal to its current speed and its battery level drop by the the value of battery drain

I like this suggestion.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Every time you drive the car using the remote control, the car travels distance equal to its current speed and its battery level drop by the the value of battery drain

I like this suggestion.

"travels distance equal to its current speed" makes no sense, speed does not equal distance.


If a car's battery is below its battery drain percentage, you can't drive the car anymore.

Expand All @@ -12,7 +12,7 @@ You have six tasks, each of which will work with remote controller car instances

## 1. Creating a remote controlled car

Allow creating a remote controller car by defining a constructor for the `RemoteControlCar` class that takes the speed of the car in meters and the battery drain percentage as its two parameters (both of type `int`):
Allow creating a remote controller car by defining a constructor for the `RemoteControlCar` class that takes the speed of the car in meters per second and the battery drain percentage as its two parameters (both of type `int`):

```csharp
int speed = 5;
Expand Down Expand Up @@ -59,7 +59,7 @@ car.BatteryDrained();

## 5. Create the Nitro remote control car

The best-selling remote control car is the Nitro, which has a stunning top speed of 50 meters with a battery drain of 4%. Implement the (static) `RemoteControlCar.Nitro()` method to return this type of car:
The best-selling remote control car is the Nitro, which has a stunning top speed of 50 meters per second with a battery drain of 4%. Implement the (static) `RemoteControlCar.Nitro()` method to return this type of car:

```csharp
var car = RemoteControlCar.Nitro();
Expand Down