diff --git a/src/Practice.java b/src/Practice.java index 89acfd9..7b4bf02 100644 --- a/src/Practice.java +++ b/src/Practice.java @@ -17,7 +17,9 @@ public class Practice { * @param items an array of strings to print */ public static void printItems(String[] items) { - // TODO: Implement this method here! + for(int i = 0; i < items.length; i++){ + System.out.println(items[i]); + } } /** @@ -45,7 +47,11 @@ public static void printItems(String[] items) { */ public static boolean moreThanDouble(int a, int b) { // TODO: Delete the dummy return statement and implement this method here! - return false; + if( a > b * 2){ + return true + } else { + return false + } } @@ -71,7 +77,13 @@ public static boolean moreThanDouble(int a, int b) { */ public static boolean allStartWithA(String[] words) { // TODO: Delete the dummy return statement and implement this method here! - return false; + for(word: words){ + if(words.length == 0 || !word.toLowerCase().startsWith("a")){ + return false + } + } + return true ; + } } public static void main(String[] args) {