Question: Question 2 : [ Marks: 2 0 ] You have to develop a restaurant order payment application. For Example, your restaurant is offering the following
Question :
Marks:
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 then it means Chicken
Handi, 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 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 heshe 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 for Pakistani rupee, for euro, and 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 MealPrice SalesTax
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, ieTotal Amount MealPrice SalesTax 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 mainifelse statements and arithmeticlogical
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
