// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
abstract class Animal(nm : String) {
    def name = nm;
    override def toString() = nm + " says " + say()
    def say() : String
}

class Dog(nm : String) extends Animal(nm) {
    def say() = "vuf"
}

object OO {
    def main(args: Array[String]) {
        val a = new Dog("Oliver")
        println(a)
    }
}
