Add SelectionSort and use template method to organize code