Question: write a program in c++ Submissions) Part A Type and run the Array class template discussed in lecture (Templates notes). . Modify the class by

write a program in c++
write a program in c++ Submissions) Part A Type and run the

Submissions) Part A Type and run the Array class template discussed in lecture (Templates notes). . Modify the class by adding sort member function (refer to Algorithm Analysis notes for sorting algorithms) Sample usage: a. sort(); Add the needed code in main to test your function. template //you can use keyword typename instead of class class Array ( private: T *ptr; int size; public: Array(T arr[], int s); void print(); template Array:: Array (T arr[], int s) { ptr - new T(S); size = for(int i . ; i a (arr, 5); Array s(arri, 4); a.print(); s.print(); return; template void Array:: print() { 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!