Create a Python program that will compute the orders for a Takeaway shop. The program will show a summary of the total order amount and the average amount per order. The user will have the option of continuing by adding additional orders.
An order set must contain one item from Main Menu and optionally additional items. Each order contains a number of identical order sets. The subtotal is the total amount of an order. The program should include some validation to check for missing data. If any required input is missing for the calculation, the program should display a message box showing the appropriate error message and not carry out the calculation.
The prices of the selling items are listed below:
Superburger $6.50 Chips $3.00
Hamburger $4.50 Soft Drink $2.00
Mini Pizza $5.00 Ice Cream $2.50
Meat Pie $4.00 Juice $3.00
If the Discount voucher box is given, the customer gets 10% discount of the subtotal amount.
You must make use of files by storing the product names and their prices stored in the file. (Modification made)
Design your user interface to fit the above requirements. Make sure that your interface is user-friendly (Looking clear, easy to understand and easy to use). For example, your UI could look like the following:
Start Running:
*** FastTrain Take Away - Main Menu ***
1. Superburger
2. Hamburger
3. Pizza
4. Meat Pie
Choose menu item: __
Quantity: __
*** FastTrain Take Away – Additional Items ***
1. Chips
2. Soft Drink
3. Ice Cream
4. Juice
Choose additional item: __
Quantity: __
*** FastTrain Take Away – Discount Voucher ***
Customer has a discount voucher (Y/N): __
After 3 orders:
*** FastTrain Take Away – Summary ***
Order Sub Total: $23.40
Total Order: $74.75
Average Order: $24.92 per order
--
--
------------------------------------
Grupo Python-Brasil
http://www.python.org.br/wiki/AntesDePerguntar
<*> Para visitar o site do grupo na web, acesse:
http://groups.google.com/group/python-brasil
<*> Para sair deste grupo, envie um e-mail para:
python-brasi...@googlegroups.com
---
Você recebeu essa mensagem porque está inscrito no grupo "Python Brasil" dos Grupos do Google.
Para cancelar inscrição nesse grupo e parar de receber e-mails dele, envie um e-mail para python-brasi...@googlegroups.com.
Para mais opções, acesse https://groups.google.com/d/optout.