/**
 * A cat that is possibly a mouser. 
 *
 * @author Drue Coles
 */
public class Cat extends Pet {

    private final boolean isMouser;

    /**
     * Creates a cat with a given name and mouser status.
     */
    public Cat(String name, boolean isMouser) {
        super(name);
        this.isMouser = isMouser;
        System.out.println("TESTING: in 2-argument Cat constructor.");
    }
            
    /**
     * Constructs a mouse-catching Cat with a given name.
     */
    public Cat(String name) {
        this(name, true);
        System.out.println("TESTING: in 1-argument Cat constructor.");
    }
    
    /**
     * Makes a cat sound.
     */
    @Override
    public void speak() {
        System.out.println("Meow!");
    }
    
    /**
     * Returns a greeting from this cat.
     */
    @Override
    public String toString() {
        if (isMouser) {
            return super.toString() + " I am a cat. I catch mice.";
        }
        return super.toString() + " I am a cat. I ignore mice.";
    }
    
    public static void main(String[] args) {
        Cat cat = new Cat("Muffin");
        System.out.println(cat);
        cat.speak();
    }
}