Hello,
as an exercise in c++, I should make a parking lot, the classes are:
Transport( with local protected variables color and max_velocity),
Car, inherites from Transport(with extra variable model),
Truck, inherites from Car(with extra variable model weight),
Bike inherites from Transport(with extra variable model gear),
and Parking which is the class that runs the parking lot.
the first problem I have, is that in Parking I'm suppuse to define array
of vehicles( which reffered to all kinds of vehicles), how can I do that?
what is the type of this array?
another problem is that I should imply function like add( vehicle),
but the vehicle type is unknown(until you create it in main),
so how can I preform: vehicles=vehicle when I don't know what type is vehicle??
and ofcourse don't know which constructors should be called??
thanks for any help..
ron