Produce

Download Category:

Produce CPP.zip - (444 KB)
[
Produce CPP/Debug/
Produce CPP/Debug/cl.command.1.tlog
Produce CPP/Debug/CL.read.1.tlog
Produce CPP/Debug/CL.write.1.tlog
Produce CPP/Debug/link.1760.read.1.tlog
Produce CPP/Debug/link.1760.write.1.tlog
Produce CPP/Debug/link.1760-cvtres.read.1.tlog
Produce CPP/Debug/link.1760-cvtres.write.1.tlog
Produce CPP/Debug/link.command.1.tlog
Produce CPP/Debug/link.read.1.tlog
Produce CPP/Debug/link.write.1.tlog
Produce CPP/Debug/link-cvtres.read.1.tlog
Produce CPP/Debug/link-cvtres.write.1.tlog
Produce CPP/Debug/mt.command.1.tlog
Produce CPP/Debug/mt.read.1.tlog
Produce CPP/Debug/mt.write.1.tlog
Produce CPP/Debug/Produce CPP.exe
Produce CPP/Debug/Produce CPP.exe.embed.manifest
Produce CPP/Debug/Produce CPP.exe.embed.manifest.res
Produce CPP/Debug/Produce CPP.exe.intermediate.manifest
Produce CPP/Debug/Produce CPP.ilk
Produce CPP/Debug/Produce CPP.lastbuildstate
Produce CPP/Debug/Produce CPP.log
Produce CPP/Debug/Produce CPP.pdb
Produce CPP/Debug/Produce CPP.vcxprojResolveAssemblyReference.cache
Produce CPP/Debug/Produce CPP.write.1.tlog
Produce CPP/Debug/Produce CPP_manifest.rc
Produce CPP/Debug/Produce.obj
Produce CPP/Debug/rc.command.1.tlog
Produce CPP/Debug/rc.read.1.tlog
Produce CPP/Debug/rc.write.1.tlog
Produce CPP/Debug/vc100.idb
Produce CPP/Debug/vc100.pdb
Produce CPP/Produce CPP.sln
Produce CPP/Produce CPP.suo
Produce CPP/Produce CPP.vcxproj
Produce CPP/Produce CPP.vcxproj.filters
Produce CPP/Produce CPP.vcxproj.user
Produce CPP/Produce.cpp
Produce CPP/Question.txt
Produce CPP/Screenshot_1.png
]

Your Community Supported Agriculture (CSA) farm delivers a box of fresh fruits and vegeta- bles to your house once a week. For this programming project, de?ne the class BoxOfProduce that contains 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 displays 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 ?ve 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 ?nal 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.
Filename: produce.cpp

Write a Review

Get a fresh solution of this question. Ask it now to our experts.
doubt

Ask Your Question

We have verified professionals who are ready to answer your question.

time

Save Time and Money

We choose experts who can quickly answer your question and that suit your budget.

download

Get Your Answer

Your satisfaction is 100% guaranteed. You can keep on asking questions until you get the answer you need.