Cat.java 218B

123456789101112131415161718
  1. public class Cat extends Pet
  2. {
  3. public Cat()
  4. {
  5. super();
  6. }
  7. public Cat(String type, String name){
  8. super(type,name);
  9. }
  10. public String speak(){
  11. return "Meow!";
  12. }
  13. }