UBS interview question

Polymorphism and example