Code:
//set.h
class set
{
public:
set(); //a constructor
void printSet(); //prints the object to the console
set setUnion(const set &); //unions the object with another set
set setInteresection(const set &); //intersects object with another set
bool isEmpty(); //determines if the object is empty
bool isElementOf(double); //determines if an element is in a object
void addElement(double); //adds element to the object
void deleteElement(double); //removes an element from the object
int getSize() const; //returns the current size of the object
bool isEqual(const set &); //determines if the object is equal to a set
private:
int size;
double setarray[100];
};
The header file is relatively simple. The source code in the cpp file is where the thinking goes. Good luck.