Question: In C + + write a program that will gather reviews ( number of stars ) for different items. It could be used by something
In C write a program that will gather reviews number of stars for different items. It could be used by something like Amazon, TripAdvisor, or a restaurant
Prompt the user for item names until "exit" is entered. Note that the item name will be entered with no spaces. You can use You are not required to use getline, no whiletrue statement.
For each item:
Prompt the user for the number of reviews
Prompt the user for that many reviews. NOTE that the reviews will ALWAYS be whole numbers integers
Calculate the average of the reviews rounded to the nearest whole number
Output the item name, the average number of stars, and the number of reviews
You MUST make at least functions in addition to main to get full credit
The first function needs to prompt the user for all the reviews. Note that main or another function is prompting for the number of reviews. The number of reviews must be passed into this function. And the sum of all the reviews must be returned
The second function needs to return the average rounded to the nearest whole number. Hint, this function should have parameters
The third function should output the results for a single item the name, the average number of stars, and the number of reviews
You MUST have prototypes for your functions
While this is not the only way to break down the program into functions, these requirements are in place to ensure that you practice particular skills presented in this chapter
You may write additional functions if you would like
Sample Run #bold underlined text is what the user types:
Item? FluffySocks
Num reviews?
Stars?
Item: FluffySocks
Stars:
Num Reviews:
Item? BallCap
Num reviews?
Stars?
Item: BallCap
Stars:
Num Reviews:
Item? exit
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
