Class UpdateCowHealthJob

java.lang.Object
edu.ucsb.cs156.happiercows.jobs.UpdateCowHealthJob
All Implemented Interfaces:
JobContextConsumer

public class UpdateCowHealthJob extends Object implements JobContextConsumer
  • Constructor Details

    • UpdateCowHealthJob

      public UpdateCowHealthJob()
  • Method Details

    • accept

      public void accept(JobContext ctx) throws Exception
      Specified by:
      accept in interface JobContextConsumer
      Throws:
      Exception
    • calculateNewCowHealth

      public static double calculateNewCowHealth(double oldCowHealth, int numCows, int totalCows, int carryingCapacity, double degradationRate)