/** Instances are dog with name and age */
public class Dog extends Animal {
   /** Constructor: instance of dog with name, age
     * Precondition: n not null, empty
     *               age >= 0
     */
   public Dog(String n, int a) {
       super(n,a);
   }
   
   /** Yields: noise of this animal */
   public String getNoise() {
       return "ruff ruff";
   }

   /** Yields: String representation of this object */
   public String toString() {
       return getName()+" (Dog, age "+getAge()+")";
   }
}