Cat.java 283B

12345678910111213141516171819
  1. /**
  2. * Write a description of class Cat here.
  3. *
  4. * @author (your name)
  5. * @version (a version number or a date)
  6. */
  7. public class Cat extends Pet
  8. {
  9. public Cat(String name){
  10. super(name);
  11. }
  12. @Override
  13. public String speak() {
  14. return "Meow";
  15. }
  16. }