c++ program
BoxOfProduce Class
Your Community Supported Agriculture (CSA) farm delivers a box of fresh fruits and vegetables to your house once a week. For this programming project, define the class BoxOfProduce that c o n t a i n s exactly three bundles of fruits or vegetables. You can represent the fruits or vegetables as an array of type string. Add appropriate constructors and accessor/mutator functions to get or set the fruits or vegetables stored in the array.
Also write an output function that d i s p l a y s the complete contents of the box on the console.
Next, write a main function that creates a BoxOfProduce with three items randomly selected from this list:
- Broccoli
- Tomato
- Kiwi
- Kale
- Tomatillo
Do not worry if your program randomly selects duplicate produce for the three items. Next, the main function should display the contents of the box and allow the user to substitute any one of the five possible fruits or vegetables for any of the fruits or vegetables selected for the box. After the user is done with substitutions it should output the final contents of the box to be delivered. Then it should ask if the user wants to create another box and if yes, it should repeat the above steps. It should keep doing so until the user chooses not to create another box of produce.
Finally, add a static variable to your class that keeps track of the total number of boxes of produce created and a static function that returns that value. Display this value in the main function at the end of each iteration of the main loop.