Package mainEngine

Class 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 results
      void createReports​(java.lang.String mode)
      Creates the different types of reports
      void getDishes​(javafx.collections.ObservableList<Dish> data)  
      void getEmployees​(javafx.collections.ObservableList<Employee> data)  
      WeeklyStats getWeeklyStats()  
      int loadAllData()
      Loads the data from the input files
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MainEngine

        public MainEngine()
      • MainEngine

        public MainEngine​(java.lang.String empPath,
                          java.lang.String dishPath,
                          java.lang.String orderPath)
    • Method Detail

      • loadAllData

        public int loadAllData()
        Loads the data from the input files
        Specified by:
        loadAllData in interface IMainEngine
        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 interface IMainEngine
      • createReports

        public void createReports​(java.lang.String mode)
        Creates the different types of reports
        Specified by:
        createReports in interface IMainEngine
        Parameters:
        mode - a String to denote how to output reports. Valid values: "ReportGeneratorForFiles" / "ReportGeneratorForHTML"
      • getDishes

        public void getDishes​(javafx.collections.ObservableList<Dish> data)
        Specified by:
        getDishes in interface IMainEngine