Scala, Design Patterns, Programming, Delegation, Coding.
private val spongeSound = new SpongeSound override def makeSound() = System.out.println(s"Sponge ${name} made ${spongeSound.obSound}") override def toString: String = s"Sponge ${name} on location ${location.x}, ${location.y}" } object TestPolymorphism extends App { val dog: Dog = new Dog("Scooby