// ---------------------------------------------------------------- // Removes a specified menu item from the restaurant menu. // ---------------------------------------------------------------- public void removeMenuItem(int index) { if (index >= 0) { Command cmd = new RemoveCommand(restaurantMenu, restaurantMenu[index], this.history); cmd.execute(); history.done_commands.Push(cmd); } }
/* * Removes a specified menu item from the * restaurant menu. */ public void removeMenuItem(int index) { /* * if (index >= 0) * restaurantMenu.RemoveAt(index); */ Command cmd = new RemoveCommand(restaurantMenu, restaurantMenu[index]); cmd.execute(); history.done_commands.Push(cmd); }