I don't understand his comment, "I'm disappointed to see that Scala has largely preserved Java's inheritance model." This directly translates to scala:
trait Priceable {
def price: Int
}
def addToCart(cart: Cart, item: Priceable) {
cart.increaseTotal(item.price)
}
class Book extends Priceable {
...same thing...
}
The only thing non-idiomatic about this in Scala is the use of a mutable cart.