Real-life example and purpose of inheritance
Filed under MakeMyTrip
The question
Provide a real-world example of inheritance in object-oriented programming and explain why it is used.
No write-up yet. Related questions below have one.
Related MakeMyTrip questions
Collected from public candidate posts and coding forums. Updated Nov 2026.