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 while(true) 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 3 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 2 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 #1(bold, underlined text is what the user types):
Item? FluffySocks
Num reviews? 5
Stars? 54454
Item: FluffySocks
Stars: 4
Num Reviews: 5
Item? BallCap
Num reviews? 3
Stars? 332
Item: BallCap
Stars: 3
Num Reviews: 3
Item? exit

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!