Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,21 @@

public class BasicUtilities {
public Boolean isGreaterThan5(Integer value) {
return null;

return value >= 5;

}

public Boolean isLessThan7(Integer value) {
return null;
return value <= 7;
}

public Boolean isBetween5And7(Integer valueToEvaluate) {
return null;
return (5 <= valueToEvaluate) && (valueToEvaluate <= 7);
}

public Boolean startsWith(String string, Character character) {
return null;
return (string.substring(0,1).equals(character));

}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,20 @@

public class IntegerArrayUtilities {
public Boolean hasEvenLength(Integer[] array) {
return null;
return array.length % 2 == 0;
}

public Integer[] range(int start, int stop) {


return null;
}

public Integer getSumOfFirstTwo(Integer[] array) {
return null;
return array[0] + array[1];
}

public Integer getProductOfFirstTwo(Integer[] array) {
return null;
return array[array.length-1] * array[array.length-2];
}
}
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
package com.zipcodewilmington.assessment2.part1;

public class WuTangConcatenator {


public WuTangConcatenator(Integer input) {
}

Integer input = 0;

public Boolean isWu() {
return null;
return input % 3 == 0;

}

public Boolean isTang() {
return null;
return input % 5 == 0;

}

public Boolean isWuTang() {
return null;
return input % 15 == 0;

}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
package com.zipcodewilmington.assessment2.part2;

import com.sun.tools.javac.util.ArrayUtils;

public class ArrayUtility {
public Integer[] merge(Integer[] array1, Integer[] array2) {
return null;
int length = array1.length + array2.length;

Integer[] result = new Integer[length];

System.arraycopy(array1, 0, result, 0, array1.length);
System.arraycopy(array2, 0, result, array1.length, array2.length);
return result;
}

public Integer[] rotate(Integer[] array, Integer index) {
Expand Down