Question: Create a python class Menu: Menu Attributes: appetizer_list: a list containing Food objects that are appetizers entree_ list: a list containing Food objects that are
Menu Attributes: appetizer_list: a list containing Food objects that are appetizers entree_ list: a list containing Food objects that are entrees dessert_list: a list containing Food objects that are desserts total_items: an int representing the total number of items on the menu Methods: init_0 Initializes the following attributes: o appetizer_list: list o entree_ list: list dessert list: list o ototal_items: int representing the total count of appetizers, entrees, and desserts. total _items is not a parameter in this init method .Arguments for appetizer list, entree_list, and dessert_list will be passed to the_ init_ method when a new Menu object is created You can assume that there will not be multiple instances of the same Food object in the appetizer list, entree_list, and dessert_list . delete_items(Food objects) Takes in a list of Food objects and removes all instances of them from the appropriate list in the menu (i.e. appetizer_list, entree_list, or dessert list) Returns a tuple containing how many items were removed from the menu and a boolean. The boolean should be True if all Food objects in the passed in list of foods were removed from the menu. The boolean should be False if any of the items were not on the menu and therefore could not be removed (ie: (5, False)) . . Do not use remove() . Should update total_items
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
