Mercurial > hg > Members > nobuyasu > scala
view chapter12/Doubling.scala @ 0:b316eec6fa7a draft default tip
add sample files
author | Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 08 Jan 2013 16:41:46 +0900 |
parents | |
children |
line wrap: on
line source
abstract class IntQueue { def get(): Int def put(x: Int) } trait Doubling extends IntQueue { abstract override def put(x: Int) { super.put(2 * x) } } class Animal trait Furry extends Animal trait HasLegs extends Animal trait FourLegged extends HasLegs class Cat extends Animal with Furry with FourLegged