1234567891011121314151617181920212223242526272829303132333435 |
-
- /**
- * Write a description of class Dog here.
- *
- * @author (your name)
- * @version (a version number or a date)
- */
- public class Dog extends Pet
- {
- // instance variables - replace the example below with your own
- String type = "dog";
- /**
- * Constructor for objects of class Dog
- */
- public Dog(String name)
- {
- super.Pet(name);
-
- }
-
- public Dog()
- {
- super.Pet();
-
- }
-
- public String speak(){
- return "Dogs say WOOF";
- }
-
- public String getType(){
- return this.type;
- }
- }
|