Question: Problem 3: Create Classes (30 points) XYZ City has a strict recycling policy where recycle bins only take glass objects ycle bins only take glass

Problem 3: Create Classes (30 points) XYZ City has a strict recycling policy where recycle bins only take glass objects ycle bins only take glass objects (represented by en the letter g) and paper objects (represented by the letter p). Trash bins can take any object. Create the two classes needed to complete the given main (do not mocny the sample run. Note that the function bin items prints out all items in the given bin. int main(int argc, char** argv) Object 03('b',"plastic bag"); Object 04('b', "plastic bag"); Object 01('g', "jar"); Object 02('p',"newspaper"); Bin trashbin("trash"); Bin recyclebin("recycle"); Sample Run: Throwing away jar in the trash. Throwing away plastic bag in the trash. Throwing away newspaper in the recycle bin. Oops! Wrong bin, can't recycle this! ***trash bin has: jar plastic bag trashbin.throw_in_bin(01); trashbin.throw_in_bin(03); recyclebin.throw_in_bin(02); recyclebin.throw_in_bin(04); ***recycle bin has: newspaper trashbin.bin_items(); recyclebin.bin_items()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
