Scala, Design Patterns, Programming, Delegation, Coding.
x, location.y + y) } } trait AnimalSound { val obSound: String } class BurkSound extends AnimalSound { val obSound: String = "BurkSound" } class SpongeSound extends AnimalSound { val obSound: String = "SpongeSound" } class Dog(override val name: String, override var location: Location) extends