MkArs

dz1.4

Oct 28th, 2016
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. package Pet;
  2.  
  3. public class PetMaster {
  4.  
  5. public static void main(String[] args) {
  6.  
  7. String PetReaction;
  8. Pet MyPet = new Pet();
  9. MyPet.eat();
  10. PetReaction = MyPet.say("NOM, NOM, NOM, NOM");
  11. System.out.println(PetReaction);
  12. MyPet.sleep();
  13.  
  14. Fish myFish = new Fish();
  15. myFish.dive(2);
  16. myFish.dive(3);
  17.  
  18. Kenguru keng = new Kenguru();
  19. keng.jump(10);
  20. }
  21. }
Add Comment
Please, Sign In to add comment