Question: C++ HOMEWORK HELP! Design a class named Lunch Box. The class should have the member variables width, size, color, and food. Declare all member variables

C++ HOMEWORK HELP! Design a class named "Lunch Box". The class should have the member variables width, size, color, and food. Declare all member variables as private. Add a default constructor and a constructor that expects values for all member variables as parameters and assigns each value to the corresponding member variable. Also, add a getter function for each member variable. Add a setter function for the food member variable only. Declare all constructors and functions as public. In the main, create one object of the LunchBox class. Create a second instance as a pointer to an object. Set the values for all member variables of each object. Use #include

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!