1. Engineering
  2. Computer Science
  3. design a class named lunchbox the class should have the...

Question: design a class named lunchbox the class should have the...

Question details

Design a class named LunchBox. 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.

can anyone show me how to solve this problem in a new way in c++

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution