Answered step by step
Verified Expert Solution
Question
1 Approved Answer
10.6 Lab: Restaurant and Rating..... C++ PLEASE 10.6 Lab: Restaurant and Rating. (1) Create three files to submit: Restaurant.h - Struct definition and related function
10.6 Lab: Restaurant and Rating..... C++ PLEASE
10.6 Lab: Restaurant and Rating. (1) Create three files to submit: Restaurant.h - Struct definition and related function declarations Restaurant.cpp Related function definitions main.cpp - main() function Build the Restaurant struct with the following specifications (Restaurant.h and Restaurant.cpp): Data members (3 pts) char restaurantName [101] char foodType [101 ] double rating; Related functions SetValues (Restaurant &aRest, char newName[], char newFood[], double newRating); (2 pts) Sets restaurant Name = newName, foodType = newFood, rating = newRating for aRest PrintValues() Prints the Restaurant Name, Food type and Rating. Has a Restaurant parameter Ex. of PrintValues(Restaurant parameter) output: Restaurant Name: Swagath India Food Type: Indian Restaurant Rating: 5.0 (2) In main0 (main.cpp), prompt the user for Restaurant Name, Food Type, and Restaurant Rating, and create one object of the Restaurant (2) In main() (main.cpp), prompt the user for Restaurant Name, Food Type, and Restaurant Rating, and create one object of the Restaurant struct. Example for Input: Enter the Restaurant Name: Enter the Food Type: Enter the Restaurant Rating: 3) Also in main.cpp, call the PrintValues(Restaurant parameter) and this will print the values for you. 4) Before you Run the program, Enter your answers in the input box. For example: Swagath India Indian 5.0 Example of your ouput: Restaurant Name: Swagath India Food Type: Indian Restaurant Rating: 5.0 5) Notes: 1. Make sure to have #include
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