1234567891011121314151617181920212223242526272829 |
- import java.util.*;
- public class Pet
- {
- private String name = "";
- private String type = "";
-
- public Pet(String name)
- {
- this.name = name;
- this.type = type;
- }
-
- public String speak(){
- return "override me!";
- }
-
- public void setType(String type){
- this.type=type;
- }
-
- public String getType(){
- return type;
- }
-
- public String getName(){
- return name;
- }
- }
|