const int MAX_MEMBERS = 16; // Set of int elements. No duplicates are allowed. class set { public: // Constructs an empty set. set(); // Constructs a set, equivalent to a_set. set(const set& a_set); // Implement using other member method(s). // Prints the set elements on the screen. void print() const; // Returns true if the set is the empty set, false otherwise. bool is_empty() const; // Returns the cardinality of the set (for finite sets, their cardinality is the number of elements in them. int get_cardinality() const; // Returns true if the element e is a member of the set, false otherwise. bool is_member(int e) const; // Implement with binary search. O(log n) // Assigns to the set the empty set. void empty(); // Adds the element e to the set. Returns true if the element is trully added, false otherwise. bool add_member(int e); // Implement with linear search and move. O(n) // Removes the member element e. Returns true if the member is trully removed, false otherwise. bool remove_member(int e); // Implement with linear search and move. O(n) // Joins two sets and assigns the result to the object from which the member method was called. bool join(const set& a_set); // Implement with merge. O(n) private: int m_members[MAX_MEMBERS]; // Member elements. int m_count; // Count of the member elements. };