NSETECH interview question

Polymorphism coding questions were tricky