Question: (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

(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

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!