Turn your unorderedSet class into a template. Use the arrayListType and unordere
ID: 3592427 • Letter: T
Question
Turn your unorderedSet class into a template. Use the arrayListType and unorderedArrayListType templates from the List Template example.. Research the mathematical operations of set union and set intersection and overload the + and - operators to perform the these operations. Write a program to test your template with integer and string sets.
Turn in your unorderedSet template and your test program (make no changes to the arrayListType and unorderedArrayListType templates). Also turn in one or more screen shots showing the results of your testing.
Once completed you will demonstrate that you can
Develop a Set template class which is derived from the unorderedArrayList template.
Build parameterized operator functions to overload + and - so that they perform set union and set intersection operations.
Design a test program to prove that your template class can manipulate integer and string sets.
Explanation / Answer
class SetUtilites{ public: template static boost::unordered_set intersection(const boost::unordered_set &set1, const boost::unordered_set &set2){ if(set1.size()Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.