Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

(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

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

Oracle9i Database Administrator Implementation And Administration

Authors: Carol McCullough-Dieter

1st Edition

0619159006, 978-0619159009

More Books

Students also viewed these Databases questions