Skip to content

Commit 99b9140

Browse files
committed
add eater, animal, horse, stable (edible params commented out)
1 parent fc256a2 commit 99b9140

4 files changed

Lines changed: 30 additions & 0 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package com.zipcodewilmington.froilansfarm;
2+
3+
public abstract class Animal implements Eater {
4+
5+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.zipcodewilmington.froilansfarm;
2+
3+
public interface Eater {
4+
5+
void eat(/*Edible edible*/);
6+
7+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package com.zipcodewilmington.froilansfarm;
2+
3+
public class Horse extends Animal {
4+
5+
public void eat(/*Edible edible*/) {
6+
System.out.println("munch munch");
7+
}
8+
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package com.zipcodewilmington.froilansfarm;
2+
3+
import java.util.List;
4+
5+
public class Stable {
6+
7+
private List<Horse> horses;
8+
9+
}

0 commit comments

Comments
 (0)