Package mainEngine
Class MainEngine
- java.lang.Object
-
- mainEngine.MainEngine
-
- All Implemented Interfaces:
IMainEngine
public class MainEngine extends java.lang.Object implements IMainEngine
Chef
Class responsible for (a) the load of the input files, (b) the computation of the statistics and (c) the creation of reports- Since:
- 2017-07-22
- Version:
- 1.0
-
-
Constructor Summary
Constructors Constructor Description MainEngine()
MainEngine(java.lang.String empPath, java.lang.String dishPath, java.lang.String orderPath)
-
Method Summary
Modifier and Type Method Description void
computeAllStats()
Computes the weekly statistics and the statistics for each employee and prints the resultsvoid
createReports(java.lang.String mode)
Creates the different types of reportsvoid
getDishes(javafx.collections.ObservableList<Dish> data)
void
getEmployees(javafx.collections.ObservableList<Employee> data)
WeeklyStats
getWeeklyStats()
int
loadAllData()
Loads the data from the input files
-
-
-
Method Detail
-
loadAllData
public int loadAllData()
Loads the data from the input files- Specified by:
loadAllData
in interfaceIMainEngine
- Returns:
- return 0 if executed properly
-
computeAllStats
public void computeAllStats()
Computes the weekly statistics and the statistics for each employee and prints the results- Specified by:
computeAllStats
in interfaceIMainEngine
-
createReports
public void createReports(java.lang.String mode)
Creates the different types of reports- Specified by:
createReports
in interfaceIMainEngine
- Parameters:
mode
- a String to denote how to output reports. Valid values: "ReportGeneratorForFiles" / "ReportGeneratorForHTML"
-
getEmployees
public void getEmployees(javafx.collections.ObservableList<Employee> data)
- Specified by:
getEmployees
in interfaceIMainEngine
-
getDishes
public void getDishes(javafx.collections.ObservableList<Dish> data)
- Specified by:
getDishes
in interfaceIMainEngine
-
getWeeklyStats
public WeeklyStats getWeeklyStats()
-
-