Question: C++ - Write the functions for a Number Set class for the following function prototypes. public: - Default constructor for integer set objects. Has a
C++ - Write the functions for a Number Set class for the following function prototypes.
public: - Default constructor for integer set objects. Has a standard upper limit by default of 1000, but accepts an optional starting value for its upper limit as a parameter. - Copy constructor for integer set objects. One NumSet parameter which is called by reference. - Destructor that clears array. - void function that places / inserts element into set, has one int parameter by turning the element in the array to true. - void function that deletes / takes out element from set, has one int parameter by turning the element in the array to false. - bool function that returns true if integer is in set, has one constant int parameter. - void union function that has two constant NumSet parameters. When used on an object, it creates the union of the two NumSet parameters and the object itself. - void intersection function, works like union function with two NumSet parameters. - bool function that determines whether two sets are equal. Has one const NumSet parameter called by reference.. - string function that returns a string of the numbers that are in an objects set that are each separated by a comma and space.
private: int upperLimit; static constant int Standard_Upper_Lim = 1000; bool *numbersInSet
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
