First exercise, OOP in Scala