Create class IntegerSet for which eachobject can hold integers in the range 0 through 100. A set isrepresented internally as an array of ones and zeros.Array elementa[ i ] is 1 if integer iis in the set. Array element a[ j ] is 0 if integerj is not in the set. The defaultconstructor initializes a set to the so-called "empty set," i.e., aset whose array representation contains allzeros.
Provide member functions for the common setoperations. For example, provide a unionOfSets memberfunction that creates a third set that is theset-theoretic unionof two existing sets (i.e., an element of the third set's array isset to 1 if that element is 1 in either or both of the existingsets, and anelement of the third set's array is set to 0 if thatelement is 0 in each of the existing sets).
Provide an intersectionOfSets memberfunction which creates a third set which is the set-theoreticintersection of two existing sets (i.e., an element ofthe thirdset's array is set to 0 if that element is 0 in either or both ofthe existing sets, and an element of the third set's array is setto 1 if that element is1 in each of the existing sets).
Provide an insertElement memberfunction that inserts a new integer k into a set (by setting a[ k ] to1). Providea deleteElement member function that deletesinteger m (by setting a[ m] to 0).
Provide a printSet member function thatprints a set as a list of numbers separated by spaces. Print onlythose elements that are present in the set (i.e.,their position inthe array has a value of 1). Print --- for an emptyset.
Provide an isEqualTo member functionthat determines whether two sets are equal.
Provide an additional constructor that receivesan array of integers and the size of that array and uses the arrayto initialize a set object.
Now write a driver program to test yourIntegerSet class. Instantiate several IntegerSetobjects. Test that all your member functions workproperly.