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 functions that perform set operations.
These are the functions you will need to write and test.
setUnion The union of and
setIntersection The intersection of and
setDiff The Difference, s s
setSymDiff The symmetric Difference of s and s
isSubSet True if is a subset of
isProperSubSet True if is a proper subset of
PowerSet The Power Set of
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
insertElementchar adds an character to the set duplicates will be ignored
removeElementchar removes the character specified if it exists and ignores otherwise isElementchar 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 cardinality 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.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
