/*
File name: Set.h
Author: Bo Bayles
E-mail address: bmb3h6@umr.edu
Description: This header file for the Set class.
*/  

const int iMAXSIZE = 10;

class Set
{
  private:
    bool pos[iMAXSIZE];
  
  public:
    Set();
    //Default constructor
    //Pre:
    //Post: All elements in the object's pos array are set to false.
    
    Set(Set &s);
    //Copy constructor
    //Pre:  s is an object of class Set passed to a function.
    //Post: All elements in the object's pos array are set equal to
    //  the elements in the passed object's array.
    
    ~Set();
    //Destructor
    //Pre: The object of class Set exists.
    //Post: The object is destructed.
    
    bool isElement(const int iNumber);
    //Pre: iNumber is a valid positive integer less than iNumber.
    //Post: If the position of the object's pos array indicated by iNumber
    //  minus 1 is true, true is returned to the calling function. Otherwise
    //  false is returned.
    
    bool isEmpty();
    //Pre:
    //Post: If all positions of the object's pos array evaluate to false,
    //  return true to the calling function. Otherwise false is returned.
    
    void addElement(const int iNumber);
    //Pre: iNumber is a valid positive integer less than iNumber.
    //Post: The position indicated by iNumber minus 1 is set to true in
    //  the object's pos array.
    
    void deleteElement(const int iNumber);
    //Pre: iNumber is a valid positive integer less than iNumber.
    //Post: The position indicated by iNumber minus 1 is set to false in
    //  the object's pos array.
    
    Set operator+(const Set s);
    //Pre: s is an object of class Set.
    //Post: The positions of the object's and s's pos arrays are compared.
    //  If the current position of either evaluates to true, set the result
    //  set's array position to true. Return the result set.
    
    Set operator*(const Set s);
    //Pre: s is an object of class Set.
    //Post: The positions of the object's and s's pos arrays are compared.
    //  If the current position of both evaluates to true, set the result
    //  set's array position to true. Return the result set.

    void printOut();
    //Pre: 
    //Post: { is outputted to the screen to indicate the beginning of a
    //  set. If any elements in the object's pos array evaluate to true,
    //  output the comparison loop's position plus 1 to the screen. If
    //  the loop's position plus 1 evaluates to true, output a , as a
    //  delimiter. Finally output } to indicate the end of the set.
};

