/* Caitlin Ross
 * ross0272@algonquinlive.com
 * Student #040750891
 * CST8284 Object Oriented Programming (Java)
 * Section 451
 * Assignment 6
 * Oct 25, 2020
 */
package assignmentSix;

public class Snake extends Animal{
    /* Unfortunately, I don't know how to stop the Animal's howTall() and measureHeight() methods from being called
     * This could cause confusion, but ideally users would use the Snake class's methods instead
     */
    
    // Constructor
    public Snake(String name, int age, double length, double weight) {
        //Using Animal class's height variable to hold Snake's length
        super(name, age, length, weight);
    }
    
    // Accessors
    // display() method is overridden to show that Snakes are measured by length, not height
    public String display() {
        return super.getName() + " is " + super.howOld() + " years old, " + super.howTall() + "m long, and weighs " + super.howHeavy() + "kg.";
    }
    public double howLong() { return super.howTall(); }
    
    // Modifiers
    public void measureLength(double length) { super.measureHeight(length); }
}
