/**
 * Write a description of class Animal here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
abstract public class Animal
{
    // instance variables - replace the example below with your own
    private double weight;
    private String food;

    /**
     * Constructor for objects of class Animal
     */
    public Animal(double weightArg, String foodArg)
    {
        // initialise instance variables
        this.weight = weightArg;
        this.food = foodArg;
    }

    public double getWeight()
    {
        return this.weight;
    }
    
    public String getFood()
    {
        return this.food;
    }
    
    public String toString()
    {
        // Tools available:
        // this                      Animal
        // this.weight               double
        // this.food                 String
        String answer = this.kind() + " weighing " + this.weight + " pounds and eating "
            + this.food;
        if (this.canFly())
            answer += "; can fly";
        if (this.canSwim())
            answer += "; can swim";
        return answer;
    }
    
    abstract public String kind ();
    
    abstract public boolean canSwim();

    abstract public boolean canFly();
}
