Problem

Redo the Sorting pattern using classes. Define a template abstract class called Sort that...

Redo the Sorting pattern using classes. Define a template abstract class called Sort that has a constructor that takes an array argument. That array argument will be the array to be sorted. The class Sort will have member functions named the same and behaving the same as the functions in Display 20.2, except that they will not have an array argument. The array will be a member variable. Define the member function sort following the model of Display 20.2. The functions split and join will be pure virtual functions (Chapter 15). Then define derived classes called Merqesort and Quicksort that realize the Sorting pattern using the merge-sort and quick-sort algorithms, respectively. The derived classes called Mergesort and Quicksort have definitions for the member functions split and join. Fully test all classes.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 20