Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Pet;
- public class Pet {
- float weight;
- float height;
- int age;
- String color;
- public void eat() {
- System.out.println("I am very hungry, let us eat some chips!");
- }
- public void sleep() {
- System.out.println("good night, see you next day! ^-^");
- }
- protected String say(String aWord) {
- String PetResponse = " Ok, brother!" + aWord;
- return PetResponse;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement