diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..a317f61 --- /dev/null +++ b/pom.xml @@ -0,0 +1,22 @@ + + + 4.0.0 + + mukhtar.alfatih + ReusingClasses + 1.0-SNAPSHOT + + + + + junit + junit + 4.12 + + + + + + \ No newline at end of file diff --git a/src/main/java/ReusingClasses/App.java b/src/main/java/ReusingClasses/App.java new file mode 100644 index 0000000..dd4ab75 --- /dev/null +++ b/src/main/java/ReusingClasses/App.java @@ -0,0 +1,7 @@ +package ReusingClasses; + +/** + * Created by alfatihmukhtar on 1/18/17. + */ +public class App { +} diff --git a/src/main/java/ReusingClasses/ArrayRotationHandler.java b/src/main/java/ReusingClasses/ArrayRotationHandler.java new file mode 100644 index 0000000..4e560d9 --- /dev/null +++ b/src/main/java/ReusingClasses/ArrayRotationHandler.java @@ -0,0 +1,39 @@ +package ReusingClasses; + +import java.util.Arrays; + +/** + * Created by alfatihmukhtar on 1/18/17. + */ +public class ArrayRotationHandler { + // take in factor "x" to rotate by + // rotate every item in array by "x" places + + // create method that takes two arguments (array, k) where k = number of elements to rotate. + public int[] rotateArray(int[] array, int rotation) { +// System.out.print("The initial array is: "); +// for(int i=0; i