PPT Slide
Implementation of a Generic Sorting Algorithm using an abstract class.
{ public abstract int compareTo(Sortable b);
/* Returns: -1 if the invoking object instance is lower in the sorting order
than the argumentinstnace ,
0 if the two instances are equal
+1 if the invoking object instance is higher in the sorting order
than the argument instance.
Example - Sort an array of Employees
1. Derive Emplpyee from Sortable
2. Implement the CompareTo() method in Employee.
3. Call ArrayAlg.Shellsort() on an array of Employee object instances.