public string AddTable(string type, int tableNumber, int capacity) { ITable table = tableFactory.Create(type, tableNumber, capacity); this.tables.Add(table); return($"Added table number {tableNumber} in the restaurant"); }
public string AddTable(string type, int tableNumber, int capacity) { ITable table = TableFactory.Create(type, tableNumber, capacity); if (table != null) { tables.Add(table); return($"Added table number {table.TableNumber} in the restaurant"); } return(string.Empty); }