diff --git a/Sorting/AlgorithmTester.java b/Sorting/AlgorithmTester.java index a6bc84e..dd9cf39 100644 --- a/Sorting/AlgorithmTester.java +++ b/Sorting/AlgorithmTester.java @@ -1,6 +1,7 @@ package Sorting; import java.util.Scanner; + import java.util.ArrayList; import java.util.InputMismatchException; //import java.time.temporal.ChronoUnit; @@ -196,7 +197,7 @@ public class AlgorithmTester{ int input; boolean ready=false; boolean print=false; - String[] sortingAlgoNames = {"selection sort", "insertion sort"}; + String[] sortingAlgoNames = {"selection sort", "insertion sort", "quick sort"}; boolean[] sortingAlgoChoices = new boolean[sortingAlgoNames.length]; System.out.print("\nPlease enter file name: "); filename = sc.next(); @@ -245,6 +246,7 @@ public class AlgorithmTester{ } boolean selection = sortingAlgoChoices[0]; boolean insertion = sortingAlgoChoices[1]; + boolean quick = sortingAlgoChoices[2]; ArrayList results = new ArrayList(); if(selection){ WordSelectionSorter selSorter = new WordSelectionSorter(reader); @@ -254,6 +256,11 @@ public class AlgorithmTester{ WordInsertionSorter inSorter = new WordInsertionSorter(reader); results.add(inSorter.measuredSort()); } + if(quick){ + //put wordquicksorter here + Sorter qSorter = new WordQuickSorter(reader); + results.add(qSorter.measuredSort()); + } for(SortResult e: results){ if(e!=null){ if(print){