Question: Create a python class Customer: Server as in a waiter, its just the name of the object not an actual server. Customer Attributes: name: str
Create a python class Customer:
Server as in a waiter, its just the name of the object not an actual server.

Customer Attributes: name: str representing the name of the customer wallet: float/int representing the amount of money the customer has; round to 2 decimal places . is_vegetarian: boolean representing if the customer is vegetarian . allergies: list of strings representing ingredients the custoper is allergic to server: a Server object representing the server assigned to the customer Methods: init initializes the following attributes: o name: str wallet: floatint, round to 2 decimal places o o is_vegetarian: boolean o allergies: list o server: Server object Arguments fr all the parameters will be passed to the init method when a new Customer object is created place_order(Food objects, Menu Object) takes in a list of Food objects and a Menu Object . Retuns a boolean Return True if the customer has enough money to purchase the food and has no allergies to any of the ingredients in any of the dishes. For each Food that the Customer is able to order (has enough money left in wallet and no allergies to the ingredients), subtract the price of the food Customer Attributes: name: str representing the name of the customer wallet: float/int representing the amount of money the customer has; round to 2 decimal places . is_vegetarian: boolean representing if the customer is vegetarian . allergies: list of strings representing ingredients the custoper is allergic to server: a Server object representing the server assigned to the customer Methods: init initializes the following attributes: o name: str wallet: floatint, round to 2 decimal places o o is_vegetarian: boolean o allergies: list o server: Server object Arguments fr all the parameters will be passed to the init method when a new Customer object is created place_order(Food objects, Menu Object) takes in a list of Food objects and a Menu Object . Retuns a boolean Return True if the customer has enough money to purchase the food and has no allergies to any of the ingredients in any of the dishes. For each Food that the Customer is able to order (has enough money left in wallet and no allergies to the ingredients), subtract the price of the food
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
