Question 1:
You are required to write a program for a small-scale café management system. The customer can
order any items from following list of menu items.
Code Meal Price (PKR)
1 Chicken Karahi 1000
2 Chicken Manchurian with 900
Egg Fried Rice
3 Chicken Biryani 350
4 Seekh Kabab (6pcs/plate) 700
5 Chicken Jalfrezi 850
Implement following modules based on the given criteria:
a. The program should print the code, names and the prices of the dishes that are available in the
menu. The customer can order any dishes using its codes. For example, if the user selects 1
then it means they have ordered Chicken Karahi, similarly, if the customer select 2 then they
ordered chicken Manchurian with egg fried rice and so on. In case of invalid code an error
message will be displayed, and a program will terminate. Make sure that the menu items are
properly formatted using manipulators. [7]
b. Once the dish has been selected, the program should ask the quantity of the item they want to
order. Note that the quantity should be greater than 0. In case of invalid quantity, display an
error message. The program should keep on asking for the quantity unless the correct quantity
is not entered. [4]
c. The customer can select more than one dishes. The program should proceed to the next stage
only if the customer no longer wants to add an item.
d. The program will finally calculate meal price, sales tax on the meal price and the total price of
the meal. For calculating sales tax, please follow the conditions in the given table below: [6]
Meal Price Applicable Sales Tax
Less than or equal to 1000 0%
Greater than 1000 and less 3%
than or equal to 3000
Greater than 3000 7%
, e. After calculating sales tax, calculate total price of the meal using the following formula: [3]
Total Amount = Meal Price + Sales Tax
f. Lastly, the program will show invoice of the bill that a customer has to pay. The invoice should
also be properly formatted. [5]
Note
Test your code 3 times for different menu items and quantity. Attach screenshot of output for each
execution.
You are required to write a program for a small-scale café management system. The customer can
order any items from following list of menu items.
Code Meal Price (PKR)
1 Chicken Karahi 1000
2 Chicken Manchurian with 900
Egg Fried Rice
3 Chicken Biryani 350
4 Seekh Kabab (6pcs/plate) 700
5 Chicken Jalfrezi 850
Implement following modules based on the given criteria:
a. The program should print the code, names and the prices of the dishes that are available in the
menu. The customer can order any dishes using its codes. For example, if the user selects 1
then it means they have ordered Chicken Karahi, similarly, if the customer select 2 then they
ordered chicken Manchurian with egg fried rice and so on. In case of invalid code an error
message will be displayed, and a program will terminate. Make sure that the menu items are
properly formatted using manipulators. [7]
b. Once the dish has been selected, the program should ask the quantity of the item they want to
order. Note that the quantity should be greater than 0. In case of invalid quantity, display an
error message. The program should keep on asking for the quantity unless the correct quantity
is not entered. [4]
c. The customer can select more than one dishes. The program should proceed to the next stage
only if the customer no longer wants to add an item.
d. The program will finally calculate meal price, sales tax on the meal price and the total price of
the meal. For calculating sales tax, please follow the conditions in the given table below: [6]
Meal Price Applicable Sales Tax
Less than or equal to 1000 0%
Greater than 1000 and less 3%
than or equal to 3000
Greater than 3000 7%
, e. After calculating sales tax, calculate total price of the meal using the following formula: [3]
Total Amount = Meal Price + Sales Tax
f. Lastly, the program will show invoice of the bill that a customer has to pay. The invoice should
also be properly formatted. [5]
Note
Test your code 3 times for different menu items and quantity. Attach screenshot of output for each
execution.