Scala: rationals with OOP