title: (Scala) How to extend apply methods from an abstract class?
body: <p>I am hoping to save a lot of lines of code in my project by putting apply/unapply methods in the base abstract class. Is it possible to not write the apply method in the case classes, but instead in the abstract class?</p>
  
  <p>The code I have written below will not actually work, but I believe it describes what I want to accomplish. The apply methods in the Animal class is not valid scala that will compile.</p>
  
  <pre><code>abstract class Animal(name:String,color:String,age:Int) {
    def apply(name:String, color:String, age:Int) = this(name,color,string) 
    def apply(name:String, color:String) = this(name,color,0) 
    def apply(name:String) = this(name,"",0) 
  }
  
  case class Rabbit(n:String,c:String,a:Int) extends Animal(n,c,a)
  case class Squirrel(n:String,c:String,a:Int) extends Animal(n,c,a)
  case class Dog(n:String,c:String,a:Int) extends Animal(n,c,a)
  case class Cat(n:String,c:String,a:Int) extends Animal(n,c,a)
  
  //(Ran elsewhere)
  Rabbit("Billy")
  Dog("Charlie","Brown",5)
  Cat("Sprinkles","White")
  </code></pre>