I am new to Scala. I just wonder why we sometimes, especially in Scala API, override trait function with a class value like the example below:
sealed trait Amount {
def amount: Double
}
case class Percentage(amount: Double) extends Amount {
override def toString = s"$amount%"
}