Question: If we were to create a separate header file and cpp file for the Restaurant class in the following code, what segment should be moved

 If we were to create a separate header file and cpp

If we were to create a separate header file and cpp file for the Restaurant class in the following code, what segment should be moved to the header file? A: #include #include using namespace std; class Restaurant public: Restaurant(string, int); Restaurant(); void Print(); private: string name; int rating; B: Restaurants Restaurant() { name = "default"; rating = @; } Restaurant: : Restaurant(string initName, int initRating) { name = initName; rating = initRating: } // Prints name and rating on one line void Restaurant::Print() { 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!