generate functionFri, 10 Feb 2023

You have to design a Food Ordering app for a restaurant The application will have a log-in for admin and users to log-in -------------------------------- Admin ---------------------------------- ➑️ Admin will have the following functionalities: ⬅️ πŸ‘‰ 1. Add new food items. Food Item will have the following details: πŸ”΄ FoodID //It should be generated automatically by the application. πŸ”΄ Name πŸ”΄ Quantity. For eg, 100ml, 250gm, 4pieces etc πŸ”΄ Price πŸ”΄ Discount πŸ”΄ Stock. Amount left in stock in the restaurant. πŸ‘‰ 2. Edit food items using FoodID. πŸ‘‰ 3. View the list of all food items. πŸ‘‰ 4. Remove a food item from the menu using FoodID. --------------------------------- User ---------------------------------- ➑️ The user will have the following functionalities: ⬅️ πŸ‘‰ 1. Register on the application. Following to be entered for registration: πŸ”΄ Full Name πŸ”΄ Phone Number πŸ”΄ Email πŸ”΄ Address πŸ”΄ Password πŸ‘‰ 2. Log in to the application πŸ‘‰ 3. The user will see 3 options: πŸ”΄ Place New Order πŸ”΄ Order History πŸ”΄ Update Profile πŸ‘‰ 4. Place New Order: The user can place a new order at the restaurant. πŸ”΅ Show list of food. The list item should as follows: πŸ”΄ Tandoori Chicken (4 pieces) [INR 240] πŸ”΄ Vegan Burger (1 Piece) [INR 320] πŸ”΄ Truffle Cake (500gm) [INR 900] πŸ‘‰ 5. Users should be able to select food by entering an array of numbers. For example, if the user wants to order Vegan Burger and Truffle Cake they should enter [2, 3] πŸ‘‰ 6. Once the items are selected user should see the list of all the items selected. The user will also get an option to place an order. πŸ‘‰ 7. Order History should show a list of all the previous orders

class FoodItem: def __init__(self, food_id, name, quantity, price, discount, stock): self.food_id = food_id = name self.quantity = quantity self.price = price = discount self.stock = stock def __repr__(self): return "{}-{}".format(self.food_id, def __str__(self): return "{}-{}".format(self.food_id, food_list = [ FoodItem(1, 'vegan burger', '1 piece', 320, 0, True), FoodItem(2, 'chicken burger', '1 piece', 180, 0, True), FoodItem(3, 'truffle cake', '500gm', 900, 0, True), FoodItem(4, 'chicken tandoori', '4 pieces', 240, 0, True) ] def show_menu(

Questions about programming?Chat with your personal AI assistant