Virtusa interview question

Polymorphism two types codes with explanation