Question
Write a program to help a local restaurant automate its breakfast billing system. The program should do the following: Show the customer the different breakfast
Write a program to help a local restaurant automate its breakfast billing system. The program should do the following: Show the customer the different breakfast items offered by the restaurant. Take customer order Change customer order Display all orders Delete a customer order Allow the customer to select more than one item from the menu Display the order information. The order should include a 6-digit order number. Each order number must be unique Once a customers order has been displayed, the program should return to the main menu Keep track of all orders To build this application, students will use multiple classes and modules. client module (client.py). This module will contain the main program that the user interacts with. It should contain two functions: mainMenu and orderMenu. mainMenu function will display the program main options. orderMenu function displays the order menu and price of each item. order module (order.py). This module will contain a class, Order, that represents an order. Each order can have customer name , order number, order items and their prices, tax amount, and total. There should be set and get methods for each attribute except the order number. The order number should only have a get method. The order number is generated when an order is created. The order number must be created within the Order class, it cannot be passed an in argument. The order number is a 6-digit number orderDatabase module (orderDatabase.py). This module will be used to store, retrieve, and manipulate orders. It will contain a class, OrderDB, that will contain all the required functionality for working with orders. OrderDB class methods addOrder method. This method takes an order object as parameter and adds it to the order database changeOrderAddItem method. This method takes as parameters the order number and item (name and price) that will be added to an order. The order will be updated in the database. The updated order is returned changeOrderRemoveItem method. This method takes as parameters the order number and item (name and price) that will be remove from the order. The order will be updated in the database. The updated order is returned. findOrder method. This method takes as parameter the order number of the order to find. Once the order is located, the method returns the order. If the order is not found, the method returns None findCustomerOrders method. This method takes the customer name as parameter and returns all orders for that customer printAllOrders method. This method returns all orders in the database. deleteOrder method. This method takes the order number as a parameter and removes the order associated with the order number from the database. It returns the deleted order deleteCustomerOrders method. This method take the customer name as a parameter, finds all orders for that customer, and deletes them. This method returns the deleted orders. deleteAllOrders method. This method deletes all orders from the database and display the number of orders deleted. When the program begins, the following options will be presented to the user: Make An Order Change An Order Find Single Order Find Customer Orders Display Orders Delete Single Order Delete Customer Orders Delete all orders exit Option 1 (Make An Order) When the user selects this option, the program should present the menu for breakfast items and prompt the user to make a selection. The user will enter the number that corresponds to a menu item. Once the user makes a selection, the program will add the item to order and prompt the user to make another selection (To keep things simple, an item can only appear in an order one time), if the user has finished ordering they will hit enter at the prompt without enter a value. The program will prompt for the customer name. Once the name is entered, the program will calculate the order tax and total, create an order, add the order to the database, and display the order information. The program will return to the main menu Plain Egg $1.45 Bacon and Egg $2.45 Muffin $0.99 French Toast $1.99 Fruit Basket $2.49 Cereal $0.50 Coffee $0.50 Tea $0.75 Note: Sales tax is 5% Example Order Information Name: Jane Order number: 456797 Bacon and Egg $2.45 Muffin $0.99 Coffee $.50 Tax $.20 Amount Due $4.14 Option 2 (Change An Order) When this option is selected, the user will be prompted for the order number. Once the order number is entered, the program will present the user with another prompt asking if they will like to add or remove an item from the order. The user will enter 1 to add item or 2 to remove item. The program will prompt for the name of the item to add or remove. If the users response is 1, the changeOrderAddItem method from OrderDB will be called and passed the item name and price. If the users response was 2, the changeOrderRemoveItem method from OrderDB will called and passed the item name and price. The program will display the updated order. Option 3 (Find Single Order) When this option is selected, the program will prompt for the order number. Once the order number is entered, the program will call findOder method from the OrderDB class and pass in the order it. If the order exists, the program will display the order information. Option 4 (Find Customer Orders) When this option is selected, the program will prompt for the customer name. The program will call findCustomerOrders from OrderDB class and pass in the customer name. The program will display all orders found for the customer. Example Order Information Name: Jane Order number: 456797 Bacon and Egg $2.45 Muffin $0.99 Coffee $.50 Tax $.20 Amount Due $4.14 Option 5 (Display Orders) When this option is selected, the program will call PrintOrders from OrderDB class. Option 6 (Delete Single Order) When this option is selected, the program will prompt for the order number. The order number will be passed to the deleteOrder method from OrderDB class. The deleted order information must be displayed Option 7(Delete Customer Orders) When this option is selected, the program will prompt for the customer name. Once the customer name is provided, the program will call the deleteCustomerOrders method from OrderDB class. The deleted order information must be displayed Option 8 (Delete All Orders) When this option is selected, the program will call deleteAllOrders method from OrderDB class. please note: this problem need to be excuted in python program language
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started