/* An inheritance example from Java Gently (3rd Edition) by Judith Bishop, minor changes by James Tam. */ public class Elephant extends Herbivores { private double tuskLength; public Elephant (String name, int weight, double length) { super(name,weight); tuskLength = length; } public String toString () { return name + " " + grassNeeded + " " + tuskLength; } }