From a630fb0a67c13e67d88d8f5d8659f4949afa2834 Mon Sep 17 00:00:00 2001 From: AlexandrBalan <85966686+AlexandrBalan@users.noreply.github.com> Date: Thu, 9 Apr 2026 14:46:51 -0700 Subject: [PATCH 1/4] implemented the print items method, so it prints the item from the array on a seperate line. --- src/Practice.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Practice.java b/src/Practice.java index c83a376..8dd206f 100644 --- a/src/Practice.java +++ b/src/Practice.java @@ -18,6 +18,9 @@ public class Practice { */ 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 d64afa9059bcdc48d1fd0497679c81afe2f9b177 Mon Sep 17 00:00:00 2001 From: AlexandrBalan <85966686+AlexandrBalan@users.noreply.github.com> Date: Thu, 9 Apr 2026 14:53:41 -0700 Subject: [PATCH 2/4] added code to the morethandouble method, returned if the value of a was greater than 2, and twice the size of b. --- src/Practice.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Practice.java b/src/Practice.java index 8dd206f..8f747cb 100644 --- a/src/Practice.java +++ b/src/Practice.java @@ -48,7 +48,7 @@ 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; + return a > 2 * b; // return if value a is greater than 2, and twice the size of b. } From 4ad021b38e52782e9473ef7676851ab4b76f890f Mon Sep 17 00:00:00 2001 From: AlexandrBalan <85966686+AlexandrBalan@users.noreply.github.com> Date: Thu, 9 Apr 2026 15:02:07 -0700 Subject: [PATCH 3/4] implemented the allStartWithA method, grab only the first letter of the word and make sure it has a capital letter, or lowercase letter, if it doesn't have one then return false. (edge case) --- src/Practice.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Practice.java b/src/Practice.java index 8f747cb..b3059bf 100644 --- a/src/Practice.java +++ b/src/Practice.java @@ -74,7 +74,17 @@ 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(int i = 0; i < words.length; i++) { + String word = words[i]; + + String firstLetter = word.substring(0,1); + + if(!firstLetter.equals("A") && !firstLetter.equals("a")) { + return false; + } + } + + return true; } public static void main(String[] args) { From 78140495c33397dc510dd1f966f7ab9d8c369855 Mon Sep 17 00:00:00 2001 From: AlexandrBalan <85966686+AlexandrBalan@users.noreply.github.com> Date: Thu, 9 Apr 2026 15:20:47 -0700 Subject: [PATCH 4/4] added my first and last name at the top of the assignment, along with the classroom name, and date. --- src/Practice.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Practice.java b/src/Practice.java index b3059bf..e9fa698 100644 --- a/src/Practice.java +++ b/src/Practice.java @@ -1,6 +1,12 @@ public class Practice { /** + * + * + * Alexandr Balan + * Date: 4/9/26 + * CS123 + * * Prints each item from an array on a separate line. * * Example: