From 3aaea915a7e6d94aa728905377902172656a8ce9 Mon Sep 17 00:00:00 2001 From: Elijah_Rhodes Date: Sun, 12 Apr 2026 19:40:03 -0700 Subject: [PATCH 1/4] Finished the allStartsWithA function --- src/Practice.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/Practice.java b/src/Practice.java index c83a376..d24ac72 100644 --- a/src/Practice.java +++ b/src/Practice.java @@ -70,7 +70,21 @@ public static boolean moreThanDouble(int a, int b) { * @return true if every word starts with A (case-insensitive), false otherwise. */ public static boolean allStartWithA(String[] words) { - // TODO: Delete the dummy return statement and implement this method here! + int counter = 0; + String tWord; + char tLet = 'a'; + for(int i = 0; i < words.length; i++) + { + tWord = words[i].toLowerCase(); + if(tWord.charAt(0) == tLet) + { + counter++; + } + } + if(words.length == counter) + { + return true; + } return false; } From 424529adff87b89bd48331aea0bb1e1fd21a9441 Mon Sep 17 00:00:00 2001 From: Elijah_Rhodes Date: Sun, 12 Apr 2026 20:51:46 -0700 Subject: [PATCH 2/4] Finished moreThanDouble function --- src/Practice.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Practice.java b/src/Practice.java index d24ac72..7c41c18 100644 --- a/src/Practice.java +++ b/src/Practice.java @@ -44,7 +44,7 @@ public static void printItems(String[] items) { * @return true if a is strictly more than twice the value of b, false otherwise */ public static boolean moreThanDouble(int a, int b) { - // TODO: Delete the dummy return statement and implement this method here! + if(a > (b*2)){return true;} return false; } From 28f1359264c2bfe22e190e490cce5eaaadee7864 Mon Sep 17 00:00:00 2001 From: Elijah_Rhodes Date: Sun, 12 Apr 2026 20:55:35 -0700 Subject: [PATCH 3/4] Finished printItems function and finished the entire program --- src/Practice.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Practice.java b/src/Practice.java index 7c41c18..1a5f94c 100644 --- a/src/Practice.java +++ b/src/Practice.java @@ -17,7 +17,10 @@ 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]); + } } /** From dad81262414091d05aef985a924d2aacc53eb844 Mon Sep 17 00:00:00 2001 From: Elijah_Rhodes Date: Mon, 13 Apr 2026 11:47:11 -0700 Subject: [PATCH 4/4] added comment --- src/Practice.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Practice.java b/src/Practice.java index 1a5f94c..730261d 100644 --- a/src/Practice.java +++ b/src/Practice.java @@ -23,6 +23,7 @@ public static void printItems(String[] items) { } } + //test /** * Returns whether a is more than twice the value of b. *