Ask the user to enter the new rating for food. Validate the rating. If the rating is not within the range of the numbers in the list, show a suitable message indicating that the rating was not changed due to an invalid rating. Ask the user to enter the new rating for service. Validate the rating. If the rating is not within the range of the numbers in the list, show a suitable message indicating that the rating was not changed due to an invalid rating. Call the displayData function to display the updated list. List of restaurant and ratings Food Name Service Horse_and_River Riosol Prime_Rib Peter's_Place Fandangos Enter a number from the list 2 1 7 6 2 8 6 3 9 5 4 7 5 6 4

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Ask the user to enter the new rating for food. Validate the rating. If the rating is not
within the range of the numbers in the list, show a suitable message indicating that
the rating was not changed due to an invalid rating.
Ask the user to enter the new rating for service. Validate the rating. If the rating is
not within the range of the numbers in the list, show a suitable message indicating
that the rating was not changed due to an invalid rating.
Call the displayData function to display the updated list.
List of restaurant and ratings
Name
Food
Service
Horse_and_River
Riosol
Prime_Rib
Peter's Place
Fandangos
Enter a number from the list 2
1
7
6
2
8
6
3
4
7
8.
5
6
4
Transcribed Image Text:Ask the user to enter the new rating for food. Validate the rating. If the rating is not within the range of the numbers in the list, show a suitable message indicating that the rating was not changed due to an invalid rating. Ask the user to enter the new rating for service. Validate the rating. If the rating is not within the range of the numbers in the list, show a suitable message indicating that the rating was not changed due to an invalid rating. Call the displayData function to display the updated list. List of restaurant and ratings Name Food Service Horse_and_River Riosol Prime_Rib Peter's Place Fandangos Enter a number from the list 2 1 7 6 2 8 6 3 4 7 8. 5 6 4
Create a C++ project to rate Restaurants. Use your surname, the word restaurants and
your student number as the name of the project.
E.g. Nkosi_restaurants_30968945
Create a struct called Restaurant that consists of the name of the restaurant, rating
for food (out of 10) and rating for service (out of 10).
1.1
struct Restaurant
|{
char name[30];
int food;
// rate food
int service; // rate service
};
1.2
Declare an array to store the Restaurant structs.
1.3 In the main function: Enter the information of a few restaurants from the keyboard
and store the structs in the array.
NOTE: The name of the restaurants must not contain spaces. See example output
below.
1.4 Write displayData() function to receive the array and number of elements and
display a numbered list of all the information of all the restaurants.
1.5 In the main function:
Call the displayData() function.
List of restaurant and ratings
Food
Name
Service
Horse_and_River
Riosol
Prime_Rib
Peter's Place
Fandangos
1
7
2
8
6
3
4
7
8
6
4
The user must be able to change the ratings of a restaurant.
Ask the user to enter the number of a restaurant on the list.
If the number is not within the range of the numbers on the list, show a suitable
message and allow the user to enter another number until a valid number is
entered. Display the name of the selected restaurant and the current rating for food
and service.
Transcribed Image Text:Create a C++ project to rate Restaurants. Use your surname, the word restaurants and your student number as the name of the project. E.g. Nkosi_restaurants_30968945 Create a struct called Restaurant that consists of the name of the restaurant, rating for food (out of 10) and rating for service (out of 10). 1.1 struct Restaurant |{ char name[30]; int food; // rate food int service; // rate service }; 1.2 Declare an array to store the Restaurant structs. 1.3 In the main function: Enter the information of a few restaurants from the keyboard and store the structs in the array. NOTE: The name of the restaurants must not contain spaces. See example output below. 1.4 Write displayData() function to receive the array and number of elements and display a numbered list of all the information of all the restaurants. 1.5 In the main function: Call the displayData() function. List of restaurant and ratings Food Name Service Horse_and_River Riosol Prime_Rib Peter's Place Fandangos 1 7 2 8 6 3 4 7 8 6 4 The user must be able to change the ratings of a restaurant. Ask the user to enter the number of a restaurant on the list. If the number is not within the range of the numbers on the list, show a suitable message and allow the user to enter another number until a valid number is entered. Display the name of the selected restaurant and the current rating for food and service.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
InputStream
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education