Question: Help me in C + + Please In this Lab you will be using a class I have created that simulates a Set of characters.

Help me in C++ Please
In this Lab you will be using a class I have created that simulates a Set of characters. You will be writing several C++ functions that perform set operations.
These are the functions you will need to write and test.
setUnion - The union of s1 and s2
setIntersection - The intersection of s1 and s2
setDiff - The Difference, s1- s2
setSymDiff - The symmetric Difference of s1 and s2
isSubSet - True if s1 is a subset of s2
isProperSubSet - True if s1 is a proper subset of s2
PowerSet - The Power Set of sP(s)
isPartition - True if the set of sets represents a partition of the given set.
You will find the declaration of these function in the file called setFunctions.h and will write the definitions in setFunctions.cpp
You can use the tests in main.cpp and add your own tests there. I have included some tests to start.
When you are sure that your functions work correctly you should turn in the file setFunctions.cpp
The Set class has several member functions:
cardinality()- returns the number of characters in the set
insertElement(char)- adds an character to the set (duplicates will be ignored)
removeElement(char)- removes the character specified if it exists and ignores otherwise isElement(char)- returns true if the specified character is in the Set.
clear()- removes all the characters from the set. (empties the set )
subscript operator ([int])- returns an character from the set. Indexes (0-> cardinality -1) equality (==)- two sets are equal if they contain all the same characters ( use the operator) less than )(- a set is less than if it has fewer characters or its smallest elements are smaller.
 Help me in C++ Please In this Lab you will be

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!