Advertisement
Guest User

Untitled

a guest
Oct 24th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. package lab4;
  2. import lab4.Animal;
  3.  
  4. public class Birds extends Animal implements Action {
  5. int average_speed;
  6.  
  7. /**
  8. * @param name
  9. * @param age
  10. * @param environment
  11. * @param average_speed
  12. */
  13.  
  14. public Birds(String name, int age, Environment environment, int average_speed) {
  15. super(name, age, environment);
  16. this.average_speed = average_speed;
  17. }
  18.  
  19. public boolean canFly() {
  20. return true;
  21. };
  22.  
  23. public boolean canSwim() {
  24. return true;
  25. }
  26. public boolean canClimb() {
  27. return false;
  28. }
  29.  
  30.  
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement