Implementing inheritance for the different algorithms.
Adding the rest of the derived class for the different algorithms