Question: Use C++ 2. (Array Class Template) (50 points) Based on the IntArray class given as below, design a single class template named Array that works

Use C++  Use C++ 2. (Array Class Template) (50 points) Based on the

2. (Array Class Template) (50 points) Based on the IntArray class given as below, design a single class template named Array that works with any primitive data type. Demonstrate the class template by creating four Array objects of integers, floats, chars and strings. Pass arguments to the constructor when you create an object. Then call the print0 member function to display the array elements of the four objects. class IntArray ( public: IntArray(int t, int): void pcint); private: int *ptC int size; 1i IntArrayaIntArray(int arcli, int s) ptr = new int[s]; size = s; for(int i-0; i

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!