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 voidcomputeAllStats()Computes the weekly statistics and the statistics for each employee and prints the resultsvoidcreateReports(java.lang.String mode)Creates the different types of reportsvoidgetDishes(javafx.collections.ObservableList<Dish> data)voidgetEmployees(javafx.collections.ObservableList<Employee> data)WeeklyStatsgetWeeklyStats()intloadAllData()Loads the data from the input files
-
-
-
Method Detail
-
loadAllData
public int loadAllData()
Loads the data from the input files- Specified by:
loadAllDatain 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:
computeAllStatsin interfaceIMainEngine
-
createReports
public void createReports(java.lang.String mode)
Creates the different types of reports- Specified by:
createReportsin 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:
getEmployeesin interfaceIMainEngine
-
getDishes
public void getDishes(javafx.collections.ObservableList<Dish> data)
- Specified by:
getDishesin interfaceIMainEngine
-
getWeeklyStats
public WeeklyStats getWeeklyStats()
-
-