1234567891011121314151617181920212223
  1. /**
  2. * Write a description of class Dog here.
  3. *
  4. * @author (your name)
  5. * @version (a version number or a date)
  6. */
  7. public class Dog extends Pet{
  8. public String getName() {
  9. return name;
  10. }
  11. public void setName(String name) {
  12. this.name = name;
  13. }
  14. public String speak() {
  15. return "Woof woof";
  16. }
  17. }