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

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

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

Post 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
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply