Ported Java Polymorphism Dojo over to Scala.