Question: Using C++ Create a class IntegerSet for which each object can hold integers in the range 0-100. Represent the set internaly as a vector of

Using C++

Create a class IntegerSet for which each object can hold integers in the range 0-100. Represent the set internaly as a vector of bool values. So if I is the vector I[0] ==true means 0 is present. I[99]==false means 99 is not present in the set. Default constructor creates the empty set.Additional constructor for non-empty set. Provide member functions for set operations as follows: 1. unionOfSets (returns a set) 2. intersectionOfsets (returns a set) 3. insertElement(int x) 4 deleteElement(int x) 5. isEqual returns true if two sets are the same 6. toString returns a string {} for empty set and {1,4,6} etc for non empty set. //7. isThere(int x) returns true is x is an element of the set and false otherwise. It should check for x in range (0-100)

I need a IntegerSet.h , IntegerSet.cpp, and main.cpp

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!