Hi, i have a question about derived classes and their use.
So, I have a base class Car and two derived classes oldCar and class newCar. oldCar has mileage information and newCar has warranty information. I want the user to input cars into the system. how do I use my derived classes that if the user wants to save the new car, the class that is used is newCar and vice versa if the user is saving the oldCar, it uses class oldCar.