Problem 1
python
A Chinese restaurant has two types of dinner combos for customers to choose. A regular dinner combo includes main dish and soup. A deluxe dinner combo includes main dish, soup and appetizer. There are three main dish choices: sweet and sour pork ($7), sesame chicken ($8) or shrimp fried rice ($9). There are two soup choices: egg drop soup ($1.25) or wanton soup ($1.50). There are two appetizer choices: spring roll ($1.25) or chicken wing ($1.50). They need a program to place orders. You Python project needs to follow these requirements:
The following shows a sample test run. This customer chooses regular dinner combo.
Enter 1 for dinner combo or 2 for deluxe dinner combo: 1
Enter 1 for egg drop soup [$1.25] or 2 for wanton soup [$1.50]: 1
Enter 1 for sweet and sour pork [$7], 2 for sesame chicken [$8] or 3 for shrimp fired rice [$9]: 2
Items ordered: egg drop soup , sesame chicken
Please pay this amount: 9.25
The following shows a sample test run. This customer chooses deluxe dinner combo.
Enter 1 for dinner combo or 2 for deluxe dinner combo: 2
Enter 1 for spring roll [$1.25] or 2 for chicken wing [$1.50]: 1
Enter 1 for egg drop soup [$1.25] or 2 for wanton soup [$1.50]: 2
Enter 1 for sweet and sour pork [$7], 2 for sesame chicken [$8] or 3 for shrimp fired rice [$9]: 3
Items ordered: spring roll , wanton soup , shrimp fried rice
Please pay this amount: 11.75
Thanks for the question.
Below is the code you will be needing Let me know if you have any doubts or if you need anything to change.
Thank You !
===========================================================================
class Dinner_Combo():
def __init__(self):
self.main_dish = 0
self.soup = 0
self.cost = 0
def choose_dish(self):
self.main_dish = int(
input('Enter 1 for sweet and sour pork [$7], 2 for sesame chicken [$8] or 3 for shrimp fired rice [$9]: '))
if self.main_dish == 1: self.cost += 7
if self.main_dish == 2: self.cost += 8
if self.main_dish == 3: self.cost += 9
def choose_soup(self):
self.soup = int(input('Enter 1 for egg drop soup [$1.25] or 2 for wanton soup [$1.50]: '))
if self.soup == 1: self.cost += 1.25
if self.soup == 2: self.cost += 1.50
def displayOrder(self):
if self.soup == 1: print('egg drop soup, ', end='')
if self.soup == 2: print('wantop soup, ', end='')
if self.main_dish == 1: print('sweet and sour pork')
if self.main_dish == 2: print('sesame chicken')
if self.main_dish == 3: print('shrimp fried rice')
print('Please pay this amount: ${:.2f}'.format(self.cost))
class Deluxe_Dinner_Combo(Dinner_Combo):
def __init__(self):
super().__init__()
self.appetizer = 0
def choose_appetizer(self):
self.appetizer = int(input('Enter 1 for spring roll [$1.25] or 2 for chicken wing [$1.50]: '))
if self.appetizer == 1: self.cost += 1.25
if self.appetizer == 2: self.cost += 1.50
def displayOrder(self):
if self.appetizer == 1: print('spring roll, ', end='')
if self.appetizer == 2: print('chicken wing, ', end='')
super().displayOrder()
def main():
type = input('Enter 1 for dinner combo or 2 for deluxe dinner combo: ')
dinnerType = None
if type == '1':
dinnerType = Dinner_Combo()
elif type == '2':
dinnerType = Deluxe_Dinner_Combo()
dinnerType.choose_appetizer()
dinnerType.choose_soup()
dinnerType.choose_dish()
print('Items ordered: ', end='')
dinnerType.displayOrder()
main()
=================================================================


---------------------------------------------------------------------------------------------------------------
let me know if you have any doubts or if you need anything to change.
If you are satisfied with the solution, please rate the answer.
Thanks!
Problem 1 python A Chinese restaurant has two types of dinner combos for customers to choose....
INSTRUCTION AND PROBLEMS Create a Python project for each of the following problems. Zip each Python project into a zip file. Submit the zip files to Blackboard for credit. PROBLEM 1 A Chinese restaurant has two types of dinner combos for customers to choose. A regular dinner combo includes main dish and soup. A deluxe dinner combo includes main dish, soup and appetizer. There are three main dish choices: sweet and sour pork ($7), sesame chicken ($8) or shrimp fried...
For the dinner special at a restaurant, the customer must choose an appetizer, a salad, an entree, a side dish, and a dessert. Here are the items to choose from. Choice Possible items Appetizer Onion rings, Buffalo wings, Nachos, Chicken strips, Shrimp cocktail Salad Garden, Southwest, Caesar Entree Lamb, Roast turkey, T-bone steak Side dish Baked potato, Corn, Rice Dessert Apple pie, Cheesecake, Chocolate cake How many dinner specials are possible?
A Chinese restaurant wants to have a computer-based search system that will display a recipe for each dish. The owner of the restaurant wants the system to be flexible in that its recipes are stored in a text file. This way, the number of dishes can be expanded by adding more entries to the text file without changing any program code. After analyzing the coding the restaurant realizes that Current coding only outputs first two line of the recipe. Goal:...