Advertisement
glee20

Animal

Oct 4th, 2018
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.31 KB | None | 0 0
  1. class Animal {
  2.     String name;
  3.     int legs;
  4.    
  5.     public Animal(String name, int legs){
  6.         this.name = name;
  7.         this.legs = legs;
  8.     }
  9.    
  10.     String getName() {
  11.         return name;
  12.     }
  13.     int getLegs() {
  14.         return legs;
  15.     }
  16.     String getNoise() {
  17.         return "";
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement