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