From f52797146568d7590213b444765d66034ff7a437 Mon Sep 17 00:00:00 2001 From: Mo <274354989+MoTheTurtle@users.noreply.github.com> Date: Sun, 12 Apr 2026 12:45:22 -0700 Subject: [PATCH 1/5] Finish first problem --- src/Practice.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Practice.java b/src/Practice.java index c83a376..9cb4b61 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! + int L = items.length; + for(int i =0; i Date: Sun, 12 Apr 2026 12:53:24 -0700 Subject: [PATCH 2/5] Finish a=2b return T/F --- src/Practice.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Practice.java b/src/Practice.java index 9cb4b61..1b7657d 100644 --- a/src/Practice.java +++ b/src/Practice.java @@ -47,8 +47,13 @@ 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! - return false; + int c = a/2; + if(c==b){ + return true; + } + else{ + return false; + } } From 5838d53586db39dafaa64ba1a1043606c4feabd1 Mon Sep 17 00:00:00 2001 From: Mo <274354989+MoTheTurtle@users.noreply.github.com> Date: Sun, 12 Apr 2026 13:06:43 -0700 Subject: [PATCH 3/5] Finish a problem, but need to fix still. Letter is not lowercase. --- src/Practice.java | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/Practice.java b/src/Practice.java index 1b7657d..e1f3811 100644 --- a/src/Practice.java +++ b/src/Practice.java @@ -78,8 +78,22 @@ 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! - return false; + int L = words.length; + boolean tf = true; + + for(int i = 0; i < L;i++ ){ + String x = words[i]; + + char c = x.charAt(0); + char a = 'a'; + if(c==a){ + tf = true; + } + else{ + return false; + } + } + return true; } public static void main(String[] args) { From d40fcd9d21318aea9ce893a0f894e7aa6167440a Mon Sep 17 00:00:00 2001 From: Mo <274354989+MoTheTurtle@users.noreply.github.com> Date: Sun, 12 Apr 2026 13:08:50 -0700 Subject: [PATCH 4/5] finish first letter A question --- src/Practice.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Practice.java b/src/Practice.java index e1f3811..a05c513 100644 --- a/src/Practice.java +++ b/src/Practice.java @@ -83,7 +83,7 @@ public static boolean allStartWithA(String[] words) { for(int i = 0; i < L;i++ ){ String x = words[i]; - + x= x.toLowerCase(); char c = x.charAt(0); char a = 'a'; if(c==a){ From 678fcfdfd895add40ee26788fe9ec6ab622953ff Mon Sep 17 00:00:00 2001 From: Mo <274354989+MoTheTurtle@users.noreply.github.com> Date: Tue, 14 Apr 2026 17:42:07 -0700 Subject: [PATCH 5/5] Fix T/F Problem --- src/Practice.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Practice.java b/src/Practice.java index a05c513..8592deb 100644 --- a/src/Practice.java +++ b/src/Practice.java @@ -48,7 +48,10 @@ public static void printItems(String[] items) { */ public static boolean moreThanDouble(int a, int b) { int c = a/2; - if(c==b){ + if(c>b){ + return true; + } + else if(c==b){ return true; } else{