Hey guys, I'm new C++ and I was handed this assignment by my professor. Who can help me with it?
Define a class called Set that stores integers in a dynamically allocated array of integers.
class Set
{
public:
void add(int n);
bool contains(int n) const;
int get_size() const;
................
private:
int* elements
int* size; };
In a set, the order of elements does not matter, and every
element can occur at most once.
Supply the add, contains, and get_size member functions and the
big three memory management functions:
1. Copyconstructor
2. Assignmentoperator 3. Destructor