Answered step by step
Verified Expert Solution
Question
1 Approved Answer
(10 points) You are given a Blob class, which can only store integers. class Blob { public: static const int INITIAL_CAPACITY = 100; Blob(const int
(10 points) You are given a Blob class, which can only store integers. class Blob { public: static const int INITIAL_CAPACITY = 100; Blob(const int initial_capacity = INITIAL_CAPACITY); Blob(const Blob& other); // copy constructor ~Blob(); // destructor void operator +=(int i); // appends an integer to the list int size() const; int get(const int index) const; void set(const int value, const int index); void print() const; // other member functions private: int *arr_; // pointer to a dynamic array int num_element_; int capacity_; // capacity of the Blob }; You have to implement the following member functions of the Blob class: a. (3 points) Constructor b. (2 points) Destructor C. (5 points) Copy constructor
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