Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Activity description: Create a C + + program that will calculate the total dinner price in a restaurant. The program should have the following functions:
Activity description: Create a C program that will calculate the total dinner price in a restaurant. The program should have the following functions:
One function that will ask the user to enter the number of people for a table reservation. The number of people per table should be between and inclusive. If the user enters a number that is not between and the function will ask the user to enter another number. The function only returns a number between and
One function to prompt the menu, ask the user to pick a dish, and return the price of the dish. The menu is:
Dinner Entrees
Price
Blended burger
$
Steak sandwich
$
Salmon salad
$
Chicken Parmesan
$
Hint: you might use conditional statement to make the selection
One function to calculate the total price. This function should use a loop that will be executed based on the number of people at the table. On each run, or iteration of the loop, the function will call the function menu, and collect and add the price per dinner entree to the total price. At the end of the function, the total price should be returned as a float or double value.
One function to calculate and return the total tax. The tax is calculated as
Tax total price
One function to calculate and return the tip. The tip is calculated as
Tip total price
One function to calculate and return the total price to pay. The total price to pay is calculated as
Total to pay total price tax tip
One function to prompt the receipt as:
STUDENTS FULL NAME
Total number of people
Total price $
Tax $
Tip $
TOTAL TO PAY $
Use t to align the price display.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started