Browse Source

changed store and storable interface

mpierse 6 years ago
parent
commit
1d17a23766

+ 2
- 1
src/main/java/com/zipcodewilmington/froilansfarm/Animals/Amimal.java View File

3
 import com.zipcodewilmington.froilansfarm.Eater;
3
 import com.zipcodewilmington.froilansfarm.Eater;
4
 import com.zipcodewilmington.froilansfarm.Edible;
4
 import com.zipcodewilmington.froilansfarm.Edible;
5
 import com.zipcodewilmington.froilansfarm.NoiseMaker;
5
 import com.zipcodewilmington.froilansfarm.NoiseMaker;
6
+import com.zipcodewilmington.froilansfarm.Storeable;
6
 
7
 
7
-public class Amimal implements NoiseMaker, Eater {
8
+public class Amimal implements NoiseMaker, Eater, Storeable {
8
 
9
 
9
 
10
 
10
     public String makeNoise(){
11
     public String makeNoise(){

+ 9
- 0
src/main/java/com/zipcodewilmington/froilansfarm/Farmer.java View File

1
 package com.zipcodewilmington.froilansfarm;
1
 package com.zipcodewilmington.froilansfarm;
2
 
2
 
3
+import com.zipcodewilmington.froilansfarm.Holders.Storer;
3
 import com.zipcodewilmington.froilansfarm.PlantsAndCrops.Botanist;
4
 import com.zipcodewilmington.froilansfarm.PlantsAndCrops.Botanist;
4
 
5
 
5
 public class Farmer extends Person implements Harvests, Botanist {
6
 public class Farmer extends Person implements Harvests, Botanist {
7
+
8
+    public void collectYeild(Storeable storeType, Storer storeBuilding) {
9
+
10
+        addToStore(storeType, storeBuilding);
11
+
12
+    }
13
+
14
+
6
 }
15
 }

+ 1
- 1
src/main/java/com/zipcodewilmington/froilansfarm/Harvests.java View File

2
 
2
 
3
 public interface Harvests {
3
 public interface Harvests {
4
 
4
 
5
-    
5
+    void collectYeild();
6
 
6
 
7
 }
7
 }

+ 4
- 0
src/main/java/com/zipcodewilmington/froilansfarm/Holders/Storer.java View File

1
 package com.zipcodewilmington.froilansfarm.Holders;
1
 package com.zipcodewilmington.froilansfarm.Holders;
2
 
2
 
3
+import com.zipcodewilmington.froilansfarm.Storeable;
4
+
3
 public interface Storer {
5
 public interface Storer {
6
+
7
+    void addToStore(Storeable itemToStore);
4
 }
8
 }

+ 8
- 0
src/main/java/com/zipcodewilmington/froilansfarm/Storeable.java View File

1
+package com.zipcodewilmington.froilansfarm;
2
+
3
+import com.zipcodewilmington.froilansfarm.Holders.Storer;
4
+
5
+public interface Storeable {
6
+
7
+    void addToStore(Storeable storeType, Storer storeBuilding);
8
+}

+ 3
- 0
src/main/java/com/zipcodewilmington/froilansfarm/Vehicle/Tractor.java View File

8
         return true;
8
         return true;
9
     }
9
     }
10
 
10
 
11
+    public void collectYeild(storeType) {
11
 
12
 
13
+        addToStore();
12
 
14
 
15
+    }
13
 }
16
 }