Design a class AbstractSort that can be used to analyze thenumber of comparisons performed by a sorting algorithm. The classshould have a member function compare that is capable of comparingtwo array elements and a means of keeping track of the number ofcomparisons performed. The class should be an abstract class with apure virtual member function void sort(int arr[ ] int size) whichwhen overridden will sort the array by calling the comparefunction to determine the relative order of pairs of numbers.Create a subclass of AbstractSort that uses a simple sortingalgorithm to implement the sort function. The class should have amember function that can be called after the sorting is done toretrieve the number of comparisons performed