@@ -0,0 +1,1155 @@
+package eco.game;%0A%0A/**%0A * This class represents wheat and associated methods, including the wheat%0A * stockpile%0A * %0A * @author phil, nate, will, connor%0A * %0A */%0A%0Apublic class Wheat %7B%0A%0A%09private int tWheat;%0A%09private static int wheatPrice;%0A%0A%09private int maxwheat = 5000;%0A%09private int minwheat = 1000;%0A%0A%09public int tWheat(int farmers, Farmer farmer) %7B%0A%09%09tWheat += farmers * farmer.getWheatProductionRate();%0A%09%09return tWheat;%0A%09%7D%0A%0A%09public int eatWheat(int request, Economy economy) %7B%0A%09%09if (tWheat %3C minwheat) %7B%0A%09%09%09int toBuy = minwheat - tWheat;%0A%09%09%09tWheat += economy.buyWheat(toBuy);%0A%09%09%7D%0A%09%09if (request %3E tWheat) %7B%0A%09%09%09int diff = request - tWheat;%0A%09%09%09tWheat = 0;%0A%09%09%09return diff;%0A%09%09%7D else %7B%0A%09%09%09tWheat -= request;%0A%09%09%09return 0;%0A%09%09%7D%0A%09%7D%0A%0A%09public int gettWheat() %7B%0A%09%09return tWheat;%0A%09%7D%0A%0A%09public void settWheat(int tWheat) %7B%0A%09%09this.tWheat = tWheat;%0A%09%7D%0A%0A%09public int getWheatPrice() %7B%0A%09%09return wheatPrice;%0A%09%7D%0A%0A%09public void update(Economy economy) %7B%0A%09%09if (tWheat %3E maxwheat) %7B%0A%09%09%09economy.sellWheat(tWheat - maxwheat);%0A%09%09%09tWheat = maxwheat;%0A%09%09%7D%0A%09%7D%0A%0A%09public void setWheatPrice(int wheatPrice) %7B%0A%09%09Wheat.wheatPrice = wheatPrice;%0A%09%7D%0A%0A%09public void resetWheat() %7B%0A%09%09tWheat = 0;%0A%09%7D%0A%0A%7D%0A

Create Wheat.java