Hi, I having trouble with an introductory java assignment. We are required to create class Car and class CarTester. My issue is with the method returning the amount of fuel remaining in the tank.
If I use / to divide miles travelled by efficiency I get an error in output which returns the value of NaN. I cannot multiply by the fraction without making class Car specific to the values provided in CarTester. I'm having trouble coming up with a solution for this. Any help or guidance would be appreciated.
If I use / to divide miles travelled by efficiency I get an error in output which returns the value of NaN. I cannot multiply by the fraction without making class Car specific to the values provided in CarTester. I'm having trouble coming up with a solution for this. Any help or guidance would be appreciated.