Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using C++ Create a class IntegerSet for which each object can hold integers in the range 0-100. Represent the set internaly as a vector of

Using C++

Create a class IntegerSet for which each object can hold integers in the range 0-100. Represent the set internaly as a vector of bool values. So if I is the vector I[0] ==true means 0 is present. I[99]==false means 99 is not present in the set. Default constructor creates the empty set.Additional constructor for non-empty set. Provide member functions for set operations as follows: 1. unionOfSets (returns a set) 2. intersectionOfsets (returns a set) 3. insertElement(int x) 4 deleteElement(int x) 5. isEqual returns true if two sets are the same 6. toString returns a string {} for empty set and {1,4,6} etc for non empty set. //7. isThere(int x) returns true is x is an element of the set and false otherwise. It should check for x in range (0-100)

I need a IntegerSet.h , IntegerSet.cpp, and main.cpp

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Online Systems For Physicians And Medical Professionals How To Use And Access Databases

Authors: Harley Bjelland

1st Edition

1878487442, 9781878487445

More Books

Students also viewed these Databases questions