Skip to content

Commit

Permalink
Add tiger to circus
Browse files Browse the repository at this point in the history
  • Loading branch information
okkhoy committed Feb 10, 2023
1 parent 36ba3f1 commit 9d37781
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/main/java/circus/animal/Tiger.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package circus.animal;

public class Tiger extends Animal {
@Override
public String toString() {
return "My name is " + name + ". I am a majestic Tiger!";
}

@Override
public int getValue() {
return 100;
}

@Override
public String speak() {
return toString() + ". I don't speak; I ROARRR!!!!";
}

public Tiger(String name) {
this.name = name;
}
}

0 comments on commit 9d37781

Please sign in to comment.