Answered You can hire a professional tutor to get the answer.

QUESTION

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 th

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 

getter 

function

for each member variable. Add a 

setter function for the food member va

riable only.

Declare all constructors and functions as 

public

.

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question