Page 1 of 1

In C++, Students shall Create a “Set” data type and students shall have to perform operator overloading for “Set” class.

Posted: Tue Jul 12, 2022 8:14 am
by answerhappygod
In C++, Students shall Create a “Set” data type and studentsshall have to perform operator overloading for “Set”class.
(Must use classes)
REQUIREMENTS:
1. Two sets shall be created in the program. User shalldecide the size of the each Set. Only Dynamic arrays shall becreated.
2. Once the sets are created then program shall show thefollowing menu A. Press “A” to Find Union B. Press “B” to FindIntersection C. Press “C” to Check Equality of Sets D. Press “D” toPerform Membership Test E. Press “E” to Exit
Set Class Member Functions:
1 Input the integer numbers into sets NOTE: Students have tooverload “stream extraction operator” for inputting into theset.
2 Find union of two sets and display the result on thescreen. Student have to overload “+” operator to perform thisoperation.
3 Find intersection of two sets and display the result on thescreen.
4 Check Equality of two sets. Students shall overload “==”operator for this operation.
5 Perform Membership test on both sets.
6 Show Function. Show Set Members on the screen. Students shalloverload “stream insertion operator” to show a set on thescreen.
7 Intersection Operation: Students shall overload “ - ”subtraction operator to perform this operation.
8 Constructor. It shall set the size of the array and aswell it will create the underlying dynamic array.
9 Destructor. It shall delete the dynamic array.
Class Data Members:
1 Size. Type Integer
2 Pointer. Type Integer