package InheritanceDemo; /** * Lion.java * * * Created: Mon Feb 5 14:43:50 2001 * * @author */ public class Lion extends Carnivore{ /** * Constructs a lion with the given name. * * @param name This animal's name. */ public Lion (String name){ super(name); } /** Prints a message showing this animal moving by running. */ public void move(){ System.out.print("Run run run "); } /** Prints a message showing this animal speaking by roaring. */ public void speak(){ System.out.print("Roar "); } public String toString(){ return name + " the Lion"; } }// Lion