Please use medium/advance source codes due to the fact that I have not learned t
ID: 3625078 • Letter: P
Question
Please use medium/advance source codes due to the fact that I have not learned them all yet. Thank YouDesign a class AbstractSort that can be used to analyze the number of comparisons performed by a sorting algorithm. The class should have a member function compare that is capable of comparing two array elements, and a means of keeping track of the number of comparisons performed. The class should be an abstract class with a pure vitual member function
void sort(int arr[ ], int size)
which, when overridden, will sort the array by calling the compare function to determine the relative order of pairs of numbers. Create a subclass of AbstractSort that uses a simple sorting algorithm to implement the sort function. The class should have a member function that can be called after the sorting is done to retrieve the number of comparisons performed.
Explanation / Answer
Hello! Could you please give me the points? I really need them... please? :(