// Speaker Example // This Dog class is derived from the abstract class // Animal. This class also implements the // Speaker interface, which means that it supplies // a speak method. public class Dog extends Animal implements Speaker { public Dog(String theName) { super(theName); } public void speak( ) { System.out.println("Woof."); } public String toString( ) { return "Dog: " + name; } }