diff --git a/src/main/java/com/zipcodewilmington/assessment1/part1/RockPaperSissorsEvaluator.java b/src/main/java/com/zipcodewilmington/assessment1/part1/RockPaperSissorsEvaluator.java index 9495445..c076196 100644 --- a/src/main/java/com/zipcodewilmington/assessment1/part1/RockPaperSissorsEvaluator.java +++ b/src/main/java/com/zipcodewilmington/assessment1/part1/RockPaperSissorsEvaluator.java @@ -13,6 +13,7 @@ public class RockPaperSissorsEvaluator { * @return the respective winning move */ public String getWinningMove(String handSign) { + return null; } diff --git a/src/main/java/com/zipcodewilmington/assessment1/part2/MultiplesDeleter.java b/src/main/java/com/zipcodewilmington/assessment1/part2/MultiplesDeleter.java index a348b0d..6b80353 100644 --- a/src/main/java/com/zipcodewilmington/assessment1/part2/MultiplesDeleter.java +++ b/src/main/java/com/zipcodewilmington/assessment1/part2/MultiplesDeleter.java @@ -10,6 +10,21 @@ public class MultiplesDeleter { * given an array of integers, named `ints` return an identical array with evens removed */ public Integer[] deleteEvens(Integer[] ints) { +// int a = 0; +// for(int i = 0; i < ints.length; i++){ +// if (ints[i] % 2 != 0){ +// a++; +// } +// } +// int[] result = new int[a]; +// int count = 0; +// for (int i = 0; i < ints.length; i++){ +// if (ints[i] % 2 != 0){ +// result[count] = ints[i]; +// count++; +// } +// } +// return result; return null; } diff --git a/src/main/java/com/zipcodewilmington/assessment1/part3/Cat.java b/src/main/java/com/zipcodewilmington/assessment1/part3/Cat.java index e731b77..17dcdd3 100644 --- a/src/main/java/com/zipcodewilmington/assessment1/part3/Cat.java +++ b/src/main/java/com/zipcodewilmington/assessment1/part3/Cat.java @@ -9,7 +9,7 @@ public class Cat extends Pet { * @param age age of this Cat */ public Cat(String name, Integer age) { - + Cat cat = new Cat("", 5); } /** @@ -38,6 +38,7 @@ public Cat() { * @return meow as a string */ public String speak() { - return null; + + return "Meow"; } } diff --git a/src/main/java/com/zipcodewilmington/assessment1/part3/Pet.java b/src/main/java/com/zipcodewilmington/assessment1/part3/Pet.java index 3c925da..ea40242 100644 --- a/src/main/java/com/zipcodewilmington/assessment1/part3/Pet.java +++ b/src/main/java/com/zipcodewilmington/assessment1/part3/Pet.java @@ -15,6 +15,7 @@ public Pet() { * @param name name of this pet */ public Pet(String name) { + } diff --git a/src/main/java/com/zipcodewilmington/assessment1/part4/Jumper.java b/src/main/java/com/zipcodewilmington/assessment1/part4/Jumper.java index f881e9c..05ddb3a 100644 --- a/src/main/java/com/zipcodewilmington/assessment1/part4/Jumper.java +++ b/src/main/java/com/zipcodewilmington/assessment1/part4/Jumper.java @@ -6,6 +6,16 @@ public class Jumper { * Complete the function below. */ public int jumps(int k, int j) { - return -1; + +// int jumps= k / j; +// int jums =+ k % j; +// return jumps; + + int numOfJumps = k / j; + int heightRemaining = k % j; + + if (heightRemaining > 0){ + return numOfJumps +1; + }else return numOfJumps; } }