// setOfIntegers.h  P. Conrad   CISC181

// a class to represent a "set" of integers
// e.g. {}
//    {2, 3, 4}
//   {1, 3}
//
// want to do union, intersect, set difference,
//  "is member of" , "is empty"
//  addToSet, subtractFromSet etc.

class SetOfIntegers
{
 public:
  SetOfIntegers(); // default constructor creates empty set
  SetOfIntegers(int x); // create a singleton set {x}
  SetOfIntegers(int x, int y); // create a set {x, y}
  ~SetOfIntegers(); // destructor

  bool isMemberOf(int x);
  bool isEmpty();
  void addToSet(int x); // adds the element x to the set
  void print() const  ; // prints the contents of the set in 
                // the format {2, 3, 4} for example

 private:
  int *members; // our set will be a pointer to array 
                // allocated from the heap

  int currentMaxSize; // size of the entire array
  int currentSetSize; // size of portion of the array
                      // currently containing members of the set
  
}; // @@@ show error that results when you forget this semicolon

