Infosys Interview Question

Implement a real life example using class and inheritance