J.P. Morgan interview question

What is polymorphism? How would you solve this problem?