Question: Create an electronic restaurant guide in C++. A restaurant's record is made up of the restaurant name, its cuisine, its price range, and its star
Create an electronic restaurant guide in C++.
A restaurant's record is made up of the restaurant name, its cuisine, its price range, and its star rating. Create an array that can hold ten restaurant records. Load the array with ten records based on data you create, (e.g.: "Antonio's Restaurant", "Italian", "High", 5). You may opt to read this data from a file or to manually load the data within the program.
The remainder of the program should allow the user to search the array by cuisine type or ratings. The program should display all records (elements) which meet the user's criteria.
Hints: If you are reading string data that contains spaces from the console or a file, you will need to use getline to input the data. In the case of reading sequential strings from a file (e.g.: name, then cuisine type), you will need to use a delimiter to separate the fields of data. One last reminder: when combining getline and cin in the same program, it is often necessary to use the ignore() function to deal with carriage returns that are stuck in the buffer.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
