HCLTech Interview Question

General OOPS concepts. Simple program