diff --git a/app/src/main/java/ch/nuth/zhaw/exbox/SortServer.java b/app/src/main/java/ch/nuth/zhaw/exbox/SortServer.java index 0a825fd..ffbd647 100644 --- a/app/src/main/java/ch/nuth/zhaw/exbox/SortServer.java +++ b/app/src/main/java/ch/nuth/zhaw/exbox/SortServer.java @@ -16,7 +16,7 @@ public class SortServer implements CommandExecutor { a[j] = h; } - private void bubbleSort(int[] a) { + public void bubbleSort(int[] a) { for (int max = a.length - 1; max >= 0; max--) { boolean isSorted = true; @@ -33,7 +33,7 @@ public class SortServer implements CommandExecutor { } } - private void insertionSort(int[] a) { + public void insertionSort(int[] a) { insertionSort(a, 0, a.length - 1); } @@ -50,7 +50,7 @@ public class SortServer implements CommandExecutor { } } - private void selectionSort(int[] a) { + public void selectionSort(int[] a) { // TODO Implement Aufgabe 3 for (int i = 0; i < a.length; i++) { int minIndex = i; @@ -131,7 +131,7 @@ public class SortServer implements CommandExecutor { // consumer sorts the data // return elapsed time in ms // if data is not sorted an exception is thrown - private double measureTime(Supplier generator, Consumer sorter) throws Exception { + public double measureTime(Supplier generator, Consumer sorter) throws Exception { double elapsed = 0; int[] a = generator.get();