Need assistance with the C# 'NeedForSpeed' question Task 3

Hi, I’m after some assistance with the c# ‘NeedForSpeed’ question Task 3.

  1. I believe we need to check if the car will run out of power BEFORE we actually drive it, but it’s not clear to me in the question what to do in the Drive() method if the car can’t drive any further, or if it is ALREADY out of power.
  2. Also, I can’t work out the formula for the Drive() method: At the moment, I’m just subtracting the ‘batteryDrain’ amount from the ‘battery’ amount. It doesn’t make sense to me having an integer representing the ‘speed’ of something, so I’m just adding that onto the ‘distance’ amount.

I’m just after some guidence.
Thank-you :)

Basically, what the Drive method should do is

  • Check if there is enough battery to drive (remaining battery >= battery drain)
    • If not, don’t drive
    • If there is:
      • Decrease the battery with the drain
      • Increase the distance with the speed

I know speed and distance and different things, but in this exercise they’re somewhat equivalent for simplicity.