Answer:
The code is not shared, but let me explain how it works. I believe there is also a class called Car.
Step-by-step explanation:
If the object is created using Car class - Vehicle ob = Car(); the result will be the return value of getMaxSpeed in Car class.
If the object is created using Airplane class - Vehicle ob = Airplane(); the result will be the return value of getMaxSpeed in Airplane class.