Fixed code for polymorphism question and gave it comments.

The comments make it more clear what the code is meant to show.