Question: PYTHON Problem 1 A Chinese restaurant has two types of dinner combos for customers to choose. A regular dinner combo includes main dish and soup.

PYTHON

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 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:

(a) Create a Dinner_combo class for regular dinner combos. This class has three protected instance variables: main_dish, soup and total. Define a choose_dish method to choose a main dish, a choose_soup method to choose a soup, and a displayOrder method to display items ordered and total amount due.

(b) Create a Deluxe_dinner_combo class for deluxe dinner combos. This class is a derived class of the dinner_combo class. It has one additional protected instance variables: appetizer. Define a choose_appetizer method to choose an appetizer, and a displayOrder method to display items ordered and total amount due.

(c) In the main module, ask user to choose either regular or deluxe dinner combo. Create an object and call its methods to input food items and display information of the order.

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

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!