Class Kitchen

java.lang.Object
simu.model.Kitchen

public class Kitchen extends Object
Kitchen Class that receives orders from the Waiter and prepares the meals.
See Also:
  • Constructor Details

    • Kitchen

      public Kitchen()
  • Method Details

    • receiveOrder

      public void receiveOrder(MenuItem item, Customer customer)
      A method that receives the order from the Waiter and adds it to the orderMap.
      Parameters:
      item - MenuItem order delivered by the Waiter.
      customer - Customer who the order belongs to.
    • getReadyMeal

      public Queue<MenuItem> getReadyMeal(Customer customer)
      A method that returns the order to the Waiter to be delivered to the Customer.
      Parameters:
      customer - Customer that the order belongs to.
      Returns:
      Queue of MenuItems that are ready to be delivered to the Customer.
    • hasReadyMeals

      public boolean hasReadyMeals(Customer customer)
      A method that checks if the Kitchen has orders ready for the Customer.
      Parameters:
      customer - Customer that the order belongs to.
      Returns:
      True if the Kitchen has orders ready for the Customer, false otherwise.
    • getPrepTime

      public double getPrepTime(MenuItem item)
      Parameters:
      item - MenuItem that the Kitchen is preparing.
      Returns:
      Prep time for the MenuItem in minutes. (To be added to the simulation time)