package eco;

public class Farmer {

    public static int fPop = 5;
    public static int fHunger;

    public static int fHunger(int popGroupNumber){
        
        int fHunger = 0;
        fHunger = popGroupNumber*(Util.randInt(9, 10));
        return fHunger;
    }

    public static int fPop(float y) { //Returns the number of farmers in
        int k= 0;
        float x= 0;
        x = y;

        x = ((x) * (1 + Main.wBirthRate - Main.wDeathRate));
       // System.out.println("Farmer pops " + x);

        k = (int)(Math.ceil(x));

        return k;

    }
    public static int checkStarvation(int hungriness, int wheat ){
        int deadpeople;
        int q;
        int e;
        double k;
        double o;
        if(hungriness > wheat){
            o = wheat/11;
            k = hungriness/11;
            e = (int) Math.floor(k);// floors hungirness
            q = (int) Math.floor(o);// floors total wheat
            deadpeople = e-q;
            return deadpeople;
        }
        return 0;
    }

}

@@ -303,120 +303,52 @@
 oat 
-y) %7B //Returns the number of farmers in%0A        int k= 0;%0A        float x= 0;%0A        x = y;%0A%0A        x = ((x) *
+fPopulation) %7B%0A        %0A        float rate =
  (1 
@@ -354,17 +354,17 @@
  + Main.
-w
+f
 BirthRat
@@ -372,17 +372,17 @@
  - Main.
-w
+f
 DeathRat
@@ -383,17 +383,16 @@
 athRate)
-)
 ;%0A      
@@ -396,60 +396,53 @@
     
-// System.out.println(%22Farmer pops %22 + x
+ fPopulation = (fPopulation * rate
 );%0A
-%0A
         
 k = 
@@ -433,24 +433,28 @@
 e);%0A        
+int 
 k = (int)(Ma
@@ -455,24 +455,53 @@
 nt)(
-Math.ceil(x)
+fPopulation);%0A        System.out.println(k
 );%0A
-%0A
     
@@ -515,22 +515,27 @@
 urn k;%0A%0A
-
     %7D%0A
+    %0A
     publ

Update Farmer.java