Use the Car and RaceCar classes you created in the You Do It section of this chapter, or
create them now. Make the following changes:
a. Add fields to the Car class to hold a Car identification number and the number of miles
the Car has traveled.
b. Add a function to set the Car number. Add a function to increase the miles a Car has
traveled in the last hour. The function adds the current speed (in miles per hour) to the
number of miles traveled. Add a function to return the miles a Car has traveled so you
can display the value.
c. Alter the turnIgnitionOn()function to initialize miles traveled to zero. Alter the
showCar()function to display the newly added Car number and miles traveled in
addition to the other Car data.
Dear customer, Unfortunately, your question requires a lot of work and cannot be done for free. Please submit it with all requirements as an assignment to our control panel and we'll assist you.