Exemplo n.º 1
0
        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");
        }
Exemplo n.º 2
0
        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);
        }