Reset visibility of required methods

This commit is contained in:
Manuel Thalmann 2022-12-13 01:35:07 +01:00
parent 88ca5cf6a0
commit 3390369d0e

View file

@ -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<int[]> generator, Consumer<int[]> sorter) throws Exception {
public double measureTime(Supplier<int[]> generator, Consumer<int[]> sorter) throws Exception {
double elapsed = 0;
int[] a = generator.get();