I have a quick question about how to deal with an inheritance problem.
Let's say we have a vehicle object
class vehicle(object):
__init__(registration):
registration = self.registration
get_details():
return "This is a vehicle"
And then a truck that inherits from vehicle
class truck(vehicle):
get_details():
return "This is a truck"
We have lots of classes all with the same methods and properties e.g. bus, car, train. However, we also have an airplane which inherits from vehicle but only airplane has a new method called required_takeoff_distance()
Is it OK to only have it in the airplane class or should you also add it to the vehicle class with a default of raise NotImplementedError()?