We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b08c37d commit 56368baCopy full SHA for 56368ba
Interface/Fish.java
@@ -0,0 +1,12 @@
1
+public class Fish implements Prey, Predator{
2
+
3
+ @Override
4
+ public void flee() {
5
+ System.out.println("The fish is swimming away");
6
+ }
7
8
9
+ public void hunt() {
10
+ System.out.println("The fish is hunting");
11
12
+}
Interface/Hawk.java
@@ -0,0 +1,7 @@
+public class Hawk implements Predator{
+ System.out.println("The hawk is hunting");
Interface/Rabbit.java
@@ -0,0 +1,8 @@
+public class Rabbit implements Prey{
+ System.out.println("The rabbit is running away");
0 commit comments