Class Tables
java.lang.Object
simu.model.Tables
Tables Class that manages the tables in the restaurant.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTables(int tableAmount, int seatsPerTable) Constructs a Tables object with the specified table amount and seats per table. -
Method Summary
Modifier and TypeMethodDescriptionintaddCustomersToTable(List<Customer> customers) Adds a list of customers to a table.intReturns the amount of free tables.intReturns the amount of tables.voidremoveCustomerFromTable(Customer customer) Removes a customer from a table.
-
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 tablesseatsPerTable- the amount of seats per table
-
-
Method Details
-
addCustomersToTable
-
removeCustomerFromTable
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
-