From fccb9917a734bf813fb0c382efdfe50dc82eb218 Mon Sep 17 00:00:00 2001 From: Bluenzo <80460870+Bluenzo@users.noreply.github.com> Date: Wed, 9 Apr 2025 08:27:16 -0700 Subject: [PATCH 1/4] I finish the first method --- src/Practice.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Practice.java b/src/Practice.java index 89acfd9..acebf82 100644 --- a/src/Practice.java +++ b/src/Practice.java @@ -18,6 +18,11 @@ public class Practice { */ public static void printItems(String[] items) { // TODO: Implement this method here! + + for(String item : items){ + System.out.println(item); + } + } /** From 3457b67bc67d5cc2d833cb2a88e1745904284927 Mon Sep 17 00:00:00 2001 From: Bluenzo <80460870+Bluenzo@users.noreply.github.com> Date: Wed, 9 Apr 2025 08:42:20 -0700 Subject: [PATCH 2/4] I finish the second method --- src/Practice.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Practice.java b/src/Practice.java index acebf82..cad59db 100644 --- a/src/Practice.java +++ b/src/Practice.java @@ -50,7 +50,10 @@ 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; + boolean value; + value = a = 2 * b; + return value; + } From 9e0121afbcee1eb0f5f3af7e7fa931912345934b Mon Sep 17 00:00:00 2001 From: Bluenzo <80460870+Bluenzo@users.noreply.github.com> Date: Wed, 9 Apr 2025 08:46:15 -0700 Subject: [PATCH 3/4] This is the second method without error --- src/Practice.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Practice.java b/src/Practice.java index cad59db..9b145c4 100644 --- a/src/Practice.java +++ b/src/Practice.java @@ -51,9 +51,9 @@ 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! boolean value; - value = a = 2 * b; + value = a > 2 * b; return value; - + } From 09569533636bf5a0e8ffd45fd138e846b34a1b73 Mon Sep 17 00:00:00 2001 From: Bluenzo <80460870+Bluenzo@users.noreply.github.com> Date: Wed, 9 Apr 2025 09:10:51 -0700 Subject: [PATCH 4/4] I finish the third method --- src/Practice.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Practice.java b/src/Practice.java index 9b145c4..89b2b13 100644 --- a/src/Practice.java +++ b/src/Practice.java @@ -79,7 +79,15 @@ 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(String word : words){ + if(word.isEmpty() || !(word.chartAt(0) == 'A' || word.chartAt(0) == 'a')){ + + return false + } + } + + return true; } public static void main(String[] args) {