Capgemini interview question

Code on Data Structure, polymorphism.