Scala, Design Patterns, Programming, Delegation, Coding.
class AnimalSound { val obSound: String } class BurkSound extends AnimalSound { val obSound: String = "BurkSound" } class Dog(val name: String, var location: Location) { def movDirection(x: Int, y: Int) = { this.location = new Location(this.location.x + x, this.location.y + y) } def