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
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