This code will build & run, but the last part of the main fi
This code will build & run, but the last part of the main file, which executes a function, does not correctly use polymorphism.Your task is to update bag/set/magicbag/bean .h and .cpp files so that polymorphism works, and the main file gives the desired output.Requirements:JellyBag should be the parent class. The others are child classes of JellyBag. A JellyBag just holds JellyItems in no particular order. Repeats are allowed.JellySet eliminates duplicate values.JellyMagicBag is the same as JellyBag except when iterating through values (using next()), the order is random.JellyBean can only hold zero or one JellyItems, so adding a second item removes the first.When you rewrite the classes, you must maximize the benefit of inheritance: do not write any extra code in the child classes that is not absolutely required. Call on your parent methods. Note, sometimes your child class will define a method like add() that must call the JellyBag version of add(). To do so, you must write JellyBag::add() in the child method because if you just write add() then the child method will call itself infinitely.
Collepals.com Plagiarism Free Papers
Are you looking for custom essay writing service or even dissertation writing services? Just request for our write my paper service, and we'll match you with the best essay writer in your subject! With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Why Hire Collepals.com writers to do your paper?
Quality- We are experienced and have access to ample research materials.
We write plagiarism Free Content
Confidential- We never share or sell your personal information to third parties.
Support-Chat with us today! We are always waiting to answer all your questions.