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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started