Question: C++ - Create a Number Set class that takes in integer values ranged 0 to an independent upper Limit for each object. Class requires these

C++ - Create a Number Set class that takes in integer values ranged 0 to an independent upper Limit for each object.

Class requires these functions:

- A standard constructor that takes in an optional int to set upper limit of the set. (The standard default upper limit is 1000 and is represented by a const).

- A constructor that creates a new object containing the same set as the Number Set object in the parameter by copying it. (Copy constructor)

- Destructor to restore array to original status.

- insert and delete functions for elements of the set. (both type bool)

- function that takes in a number and determines if a set contains that number (type bool)

- string function that returns a string of the numbers that are in the set of the object (type string)

Private member variables of class:

- int for the upper limit of each set.

- static constant int for the default upper limit of the set

- pointer to represent array containing each set (bool *set)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!