class car
{
string carID
string carName
};
class electric : public car
{
string battery
string model
};
base class is car
. electric
is a derived class that inherits from car
.
What would need to be included in the constructor to initialise them and then set the values when the user inputs a new car with the data for all the attributes?