Solve the question with python Design Foodcart class and Food class so that the following code provides the expected output. cart1 = Foodcart() food1 = Food('Burger','Chillox',180) food2 =...


Solve the question with python


Design Foodcart class and Food class so that the following code provides
the expected output.


cart1 = Foodcart()
food1 = Food('Burger','Chillox',180)
food2 = Food.createFood('Cake','Mr. Baker',1000)
print("===========================")
print(food1)
print("===========================")
cart1.addFood(food1,food2)
print("===========================")
cart1.setCartName("Foodpanda")
cart1.addFood(food1,food2)
cart1.addFood(Food('Steak','Woodhouse Grill',2000))
print("Total Price Available:",Foodcart.totalPrice)
print("===========================")
print("Total Foods created:",Food.totalFoods)
print("===========================")
cart1.printCartDetails()
print("===========================")
cart1.removeFood("French Fry")
print("===========================")
cart1.removeFood("Steak")
print("===========================")
cart1.printCartDetails()
print("===========================")
print("Total Price Available:",Foodcart.totalPrice)



Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here