Question: Hi, could you help me write a c++ code? Please follow the instructions below main.cpp #include #include #include Restaurant.h using namespace std; int main() {

Hi, could you help me write a c++ code? Please follow the instructions below

Hi, could you help me write a c++ code? Please follow theinstructions below main.cpp #include #include #include "Restaurant.h" using namespace std; int main()main.cpp

#include #include

#include "Restaurant.h" using namespace std;

int main() { /* Type your code here */ return 0; }

------------------------------------------------------------------------

Restaurant.cpp

#include #include #include #include "Restaurant.h" using namespace std;

/* Type your code here */

------------------------------------------------------

Restaurant.h

#ifndef RESTAURANT_H #define RESTAURANT_H

/* Type your code here */ //data members

//function prototypes

#endif

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 restaurantName = 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 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 in your Restaurant.cpp file. 2. Make sure to have the statement, cout

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 Databases Questions!