123456789101112131415161718192021222324 |
-
- /**
- * Write a description of class Pet here.
- *
- * @author (your name)
- * @version (a version number or a date)
- */
- public class Pet
- {
- private String name;
- public Pet (String name) {
- this.name = name;
- }
- public String speak() {
- return "indeterminate noise";
- }
- public void setName(String newName) {
- this.name = newName;
- }
- public String getName() {
- return name;
- }
- }
|