In c++ Create a class named Restaurant that has two member objects: a Burger object, and a Fries object. In addition to this, it also has a member variable named name, to allow you to name your Restaurant. Burger has two member variables: double weight;  int number_of_toppings; Fries has two member variables: string potato_type;  char size; Write the code for all three classes. You will need to determine what functions are necessary to initialize all the members of the Restaurant class and write those necessary functions.  Finally, you will write the code in the main that you would use to declare a Restaurant object, and set the different member variables.

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter10: Introduction To Inheritance
Section: Chapter Questions
Problem 6RQ
icon
Related questions
Question

In c++

Create a class named Restaurant that has two member objects: a Burger object, and a Fries object. In addition to this, it also has a member variable named name, to allow you to name your Restaurant.

Burger has two member variables:

double weight; 

int number_of_toppings;

Fries has two member variables:

string potato_type; 

char size;

Write the code for all three classes. You will need to determine what functions are necessary to initialize all the members of the Restaurant class and write those necessary functions. 

Finally, you will write the code in the main that you would use to declare a Restaurant object, and set the different member variables.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 4 images

Blurred answer
Knowledge Booster
Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,