From fc40c47cc43f11946db205d0e186929e3815ba00 Mon Sep 17 00:00:00 2001 From: sandeersson Date: Tue, 8 Apr 2025 20:44:05 -0700 Subject: [PATCH 1/3] Wrote the first method --- src/Practice.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Practice.java b/src/Practice.java index 89acfd9..ae0031e 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 (String item : items) { + System.out.println(item); + } } /** From 010e63bc3740addc50d5eb6e1d0f723b24e184cf Mon Sep 17 00:00:00 2001 From: sandeersson Date: Tue, 8 Apr 2025 20:46:52 -0700 Subject: [PATCH 2/3] Wrote the second method --- src/Practice.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Practice.java b/src/Practice.java index ae0031e..95cc648 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 > b*2; } From e2789091f839ad403dda8aaed3cb74cb529438d3 Mon Sep 17 00:00:00 2001 From: sandeersson Date: Tue, 8 Apr 2025 20:57:45 -0700 Subject: [PATCH 3/3] Wrote the last method --- src/Practice.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Practice.java b/src/Practice.java index 95cc648..27d744c 100644 --- a/src/Practice.java +++ b/src/Practice.java @@ -74,7 +74,12 @@ 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.charAt(0) == 'A' || word.charAt(0) == 'a')) { + return false; + } + } + return true; } public static void main(String[] args) {