Corrected project structure
This commit is contained in:
parent
3eff87291b
commit
0adfcaca7a
@ -1,4 +1,4 @@
|
|||||||
package src.main.com.java.conversions;
|
package src.main.java.com.conversions;
|
||||||
|
|
||||||
public class AnyBaseToDecimal {
|
public class AnyBaseToDecimal {
|
||||||
/**
|
/**
|
@ -1,4 +1,4 @@
|
|||||||
package main.com.java.conversions;
|
package src.main.java.com.conversions;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package src.main.com.java.search;
|
package src.main.java.com.search;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Binary search is an algorithm which finds the position of a target value within a sorted array
|
* Binary search is an algorithm which finds the position of a target value within a sorted array
|
@ -1,7 +1,4 @@
|
|||||||
package src.main.com.java.sorts;
|
package src.main.java.com.sorts;
|
||||||
|
|
||||||
import static src.main.com.java.sorts.SortUtils.less;
|
|
||||||
import static src.main.com.java.sorts.SortUtils.swap;
|
|
||||||
|
|
||||||
public class BubbleSort {
|
public class BubbleSort {
|
||||||
/**
|
/**
|
||||||
@ -17,8 +14,8 @@ public class BubbleSort {
|
|||||||
do {
|
do {
|
||||||
swap = false;
|
swap = false;
|
||||||
for (int count = 0; count < last - 1; count++) {
|
for (int count = 0; count < last - 1; count++) {
|
||||||
if (less(array[count + 1], array[count])) {
|
if (SortUtils.less(array[count + 1], array[count])) {
|
||||||
swap = swap(array, count, count + 1);
|
swap = SortUtils.swap(array, count, count + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
last--;
|
last--;
|
@ -1,11 +1,11 @@
|
|||||||
package src.main.com.java.sorts;
|
package src.main.java.com.sorts;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static src.main.com.java.sorts.SortUtils.less;
|
import static src.main.java.com.sorts.SortUtils.less;
|
||||||
import static src.main.com.java.sorts.SortUtils.swap;
|
import static src.main.java.com.sorts.SortUtils.swap;
|
||||||
|
|
||||||
public class HeapSort {
|
public class HeapSort {
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
package src.main.com.java.sorts;
|
package src.main.java.com.sorts;
|
||||||
|
|
||||||
import static src.main.com.java.sorts.SortUtils.less;
|
import static src.main.java.com.sorts.SortUtils.less;
|
||||||
import static src.main.com.java.sorts.SortUtils.swap;
|
import static src.main.java.com.sorts.SortUtils.swap;
|
||||||
|
|
||||||
public class QuickSort {
|
public class QuickSort {
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
package src.main.com.java.sorts;
|
package src.main.java.com.sorts;
|
||||||
|
|
||||||
import static src.main.com.java.sorts.SortUtils.less;
|
import static src.main.java.com.sorts.SortUtils.less;
|
||||||
import static src.main.com.java.sorts.SortUtils.swap;
|
import static src.main.java.com.sorts.SortUtils.swap;
|
||||||
|
|
||||||
public class SelectionSort {
|
public class SelectionSort {
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
package src.main.com.java.sorts;
|
package src.main.java.com.sorts;
|
||||||
|
|
||||||
import static src.main.com.java.sorts.SortUtils.less;
|
import static src.main.java.com.sorts.SortUtils.less;
|
||||||
import static src.main.com.java.sorts.SortUtils.swap;
|
import static src.main.java.com.sorts.SortUtils.swap;
|
||||||
|
|
||||||
public class ShellSort {
|
public class ShellSort {
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package src.main.com.java.sorts;
|
package src.main.java.com.sorts;
|
||||||
|
|
||||||
final class SortUtils {
|
final class SortUtils {
|
||||||
|
|
@ -1,8 +1,8 @@
|
|||||||
package src.test.com.java.conversions;
|
package src.test.java.com.conversions;
|
||||||
|
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import src.main.com.java.conversions.AnyBaseToDecimal;
|
import src.main.java.com.conversions.AnyBaseToDecimal;
|
||||||
|
|
||||||
public class AnyBaseToDecimalTest {
|
public class AnyBaseToDecimalTest {
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
package test.com.java.conversions;
|
package src.test.java.com.conversions;
|
||||||
|
|
||||||
import main.com.java.conversions.DecimalToAnyBase;
|
import src.main.java.com.conversions.DecimalToAnyBase;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import static junit.framework.Assert.assertEquals;
|
import static junit.framework.Assert.assertEquals;
|
@ -1,8 +1,8 @@
|
|||||||
package src.test.com.java.search;
|
package src.test.java.com.search;
|
||||||
|
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import src.main.com.java.search.BinarySearch;
|
import src.main.java.com.search.BinarySearch;
|
||||||
|
|
||||||
public class BinarySearchTest {
|
public class BinarySearchTest {
|
||||||
|
|
@ -1,9 +1,9 @@
|
|||||||
package src.test.com.java.sorts;
|
package src.test.java.com.sorts;
|
||||||
|
|
||||||
|
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import src.main.com.java.sorts.BubbleSort;
|
import src.main.java.com.sorts.BubbleSort;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
@ -1,9 +1,9 @@
|
|||||||
package src.test.com.java.sorts;
|
package src.test.java.com.sorts;
|
||||||
|
|
||||||
|
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import src.main.com.java.sorts.HeapSort;
|
import src.main.java.com.sorts.HeapSort;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
@ -1,9 +1,9 @@
|
|||||||
package src.test.com.java.sorts;
|
package src.test.java.com.sorts;
|
||||||
|
|
||||||
|
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import src.main.com.java.sorts.QuickSort;
|
import src.main.java.com.sorts.QuickSort;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
@ -1,8 +1,8 @@
|
|||||||
package src.test.com.java.sorts;
|
package src.test.java.com.sorts;
|
||||||
|
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import src.main.com.java.sorts.SelectionSort;
|
import src.main.java.com.sorts.SelectionSort;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
@ -1,8 +1,8 @@
|
|||||||
package src.test.com.java.sorts;
|
package src.test.java.com.sorts;
|
||||||
|
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import src.main.com.java.sorts.ShellSort;
|
import src.main.java.com.sorts.ShellSort;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user