Capgemini interview question

Write polymorphism code any language u prefer