Package edu.ucsb.cs156.happiercows.jobs
Class UpdateCowHealthJob
java.lang.Object
edu.ucsb.cs156.happiercows.jobs.UpdateCowHealthJob
- All Implemented Interfaces:
JobContextConsumer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(JobContext ctx) static void
calculateCowDeaths
(UserCommons userCommons, JobContext ctx) static double
calculateNewCowHealthUsingStrategy
(CowHealthUpdateStrategy strategy, Commons commons, UserCommons userCommons, int totalCows, CommonsRepository commonsRepository)
-
Constructor Details
-
UpdateCowHealthJob
public UpdateCowHealthJob()
-
-
Method Details
-
accept
- Specified by:
accept
in interfaceJobContextConsumer
- Throws:
Exception
-
calculateNewCowHealthUsingStrategy
public static double calculateNewCowHealthUsingStrategy(CowHealthUpdateStrategy strategy, Commons commons, UserCommons userCommons, int totalCows, CommonsRepository commonsRepository) -
calculateCowDeaths
-