Question: Question 2 : [ Marks: 2 0 ] You have to develop a restaurant order payment application. For Example, your restaurant is offering the following

Question 2:
[Marks: 20]
You have to develop a restaurant order payment application. For Example, your restaurant is offering the
following meals.
Your program should print the name of dishes along with their corresponding codes so that a user can
select one of the dishes by using its code. For example, if the user selects code 1, then it means Chicken
Handi, 2 means Chicken Karahi, so on and so forth. If the user has entered an invalid code, your program
will print some error message and terminate.
After the user has been asked the dish that he wants to buy, your program will ask the user to enter the
quantity of the dish that he wants to buy in kilograms. The quantity will be greater than 0. If the user has
entered an invalid quantity, then print some error message and terminate the program. After that, the
program should ask from the user about currency in which he/she wants to give payment. For this
assignment, you are required to use three currencies. One is Pakistani rupee, second is dollar and the
last one is euro. Use 1 for Pakistani rupee, 2 for euro, and 3 for dollar. If the user has entered an invalid
option, then your program will print some error message and terminate.
After that, your program will calculate the meal price, sales tax on the meal price and total price of the
meal (calculated after adding meal price and sales tax).
For calculating sales tax, you can use meal price in rupees which is hard coded in this case, and calculate
sales tax on it using the table given below.
After calculating the sales tax, the program will calculate the total amount or price payable by using the
following formula:
Total _Amount = Meal_Price + Sales_Tax
Hint: You can calculate everything in Pakistani rupees, and then convert them into the desired currency.
After calculating the total amount in rupees, you are required to convert the amount into the desired
currency (based on the user's choice). For example, if the user selected rupees then simply display final
price, i.e.,(Total Amount = Meal_Price + Sales_Tax) in rupees but if the user selected dollar or euro, then
simply convert the final meal price that you calculated earlier (in rupees) into dollar or euro according to
the currency exchange rate. Also display the amount of sales tax and the meal price excluding sales tax.
Note:
Use current exchange rate for this assignment as given below
Write in c++ and only use int main()/if/else statements and arithmetic/logical.
Question 2 : [ Marks: 2 0 ] You have to develop a

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 Programming Questions!