Seven Peaks Software interview question

How to use Polymorphism and Inheritance to make the code runnable?