Class Tables

java.lang.Object
simu.model.Tables

public class Tables extends Object
Tables Class that manages the tables in the restaurant.
See Also:
  • Constructor Details

    • Tables

      public Tables(int tableAmount, int seatsPerTable)
      Constructs a Tables object with the specified table amount and seats per table.
      Parameters:
      tableAmount - the amount of tables
      seatsPerTable - the amount of seats per table
  • Method Details

    • addCustomersToTable

      public int addCustomersToTable(List<Customer> customers)
      Adds a list of customers to a table.
      Parameters:
      customers - the list of customers
      Returns:
      the table number if the customers were seated, -1 otherwise
    • removeCustomerFromTable

      public void removeCustomerFromTable(Customer customer)
      Removes a customer from a table.
      Parameters:
      customer - the customer to remove
    • getFreeTables

      public int getFreeTables()
      Returns the amount of free tables.
      Returns:
      the amount of free tables
    • getTableAmount

      public int getTableAmount()
      Returns the amount of tables.
      Returns:
      the amount of tables