Corrected project structure

This commit is contained in:
varunu28 2018-08-28 13:16:45 -07:00
parent 3eff87291b
commit 0adfcaca7a
17 changed files with 35 additions and 38 deletions

View File

@ -1,4 +1,4 @@
package src.main.com.java.conversions; package src.main.java.com.conversions;
public class AnyBaseToDecimal { public class AnyBaseToDecimal {
/** /**

View File

@ -1,4 +1,4 @@
package main.com.java.conversions; package src.main.java.com.conversions;
import java.util.ArrayList; import java.util.ArrayList;

View File

@ -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

View File

@ -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--;

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -1,4 +1,4 @@
package src.main.com.java.sorts; package src.main.java.com.sorts;
final class SortUtils { final class SortUtils {

View File

@ -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 {

View File

@ -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;

View File

@ -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 {

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;