From 96a9f4bceb53960d0f8bde1390c7004086f0e624 Mon Sep 17 00:00:00 2001 From: Amy Gill Date: Wed, 7 Feb 2018 07:56:20 -0500 Subject: [PATCH 1/5] here is my code --- src/main/java/Main.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/main/java/Main.java b/src/main/java/Main.java index 617866b..80a45c0 100644 --- a/src/main/java/Main.java +++ b/src/main/java/Main.java @@ -1,9 +1,23 @@ +import java.util.Scanner; + /** * Created by iyasuwatts on 10/17/17. */ + + + public class Main { public static void main(String[] args ){ + Scanner AliceBob = new Scanner(System.in); + System.out.println("Please enter your name: "); + String person = AliceBob.nextLine(); + if (person.equals("Alice")) { + System.out.println("Hello" + AliceBob); + } else if (person.equals("Bob")){ + System.out.println("Hello" + AliceBob); + } + } } From 4c26b07bc8057860d54ff58a95312e0b79138888 Mon Sep 17 00:00:00 2001 From: Amy Gill Date: Wed, 7 Feb 2018 16:05:40 -0500 Subject: [PATCH 2/5] alice and bob FINALLLLLLLLLY --- .DS_Store | Bin 0 -> 6148 bytes src/main/java/Main.java | 8 ++++---- 2 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..7fa547789922cb128be8d689c1995a56d6ab5924 GIT binary patch literal 6148 zcmeHKu};G<5Pfb7v|{N73zA0`keFFQl?+IrqVfZfq(VpuL7_;DS@;;fj}L%%wpEd& ztO!+i()rovcXsk@#W4Ugd(F>)DS$Cua4=!9!K7cjXM+&gAsRPEg)7`6#S2b)Yz_QJ z1!V1xaE(V~sPS|C=9uG#>v(~}^)6X^LXH_(DNY$HQCt>PmKIgYQDh69(~rNLu?Fnn zne3A6w+-x%4ts(H63!Cyc@pN7$lK$agHFbfJFQ06VZC=)yI65o)_A}Ys}A?G!(~%V z6;K6Kfvs17XSUdQ-=mhQfGVI0tQC;&gQW{b0UM9*)4{@B0f-}pov|)If|6qcMgbd- z?4cQ-O7y8FTrrGKXWRx}6tMB=(_zBp!-SblxS<#~JIA+<4ikCQQWa1I+6oMPb1LV5 z^85Y2oun;QKo!_31 Date: Sun, 18 Feb 2018 16:08:06 -0500 Subject: [PATCH 3/5] second iteration. post reading. for anyone reading this if there is a more efficient way to do this tell me. --- src/main/java/Main.java | 62 +++++++++++++++++++++++++++++++++++------ 1 file changed, 53 insertions(+), 9 deletions(-) diff --git a/src/main/java/Main.java b/src/main/java/Main.java index 304027c..4890e14 100644 --- a/src/main/java/Main.java +++ b/src/main/java/Main.java @@ -5,19 +5,63 @@ */ +public class Main{ + public static void main(String[] args){ + Scanner input = new Scanner(System.in); + System.out.println("Please enter your first name."); + String usersName = input.nextLine(); + if(usersName.equalsIgnoreCase("alice") || usersName.equalsIgnoreCase("bob")){ + System.out.println("Sup, " + usersName); + } else { + System.out.println("We're sorry. We don't like you. You don't get a greeting. Have a nice day."); + } + } +} + + + + + + + + + + + + + + + -public class Main { - public static void main(String[] args ){ + + + + + + + + + + + + + + +/* +public class Main{ + public static void main(String[] args){ Scanner input = new Scanner(System.in); - System.out.println("Please enter your name: "); - String person = input.nextLine(); - if (person.equals("Alice")) { - System.out.println("Hello " + person); - } else if (person.equals("Bob")){ - System.out.println("Hello " + person); + System.out.println("Please enter your name"); + String usersName = input.nextLine(); + if (usersName.equalsIgnoreCase("Alice") || usersName.equalsIgnoreCase("bob")){ + System.out.println("Sup, " + usersName); + } else { + System.out.println("Sorry. We don't like you. You don't get a greeting. Have a nice day."); } + } - } } + +*/ From baa4668920f7e5570058cec236481928e2d92253 Mon Sep 17 00:00:00 2001 From: Amy Gill Date: Sun, 18 Feb 2018 16:09:07 -0500 Subject: [PATCH 4/5] second iteration. if you are reading this and you know of a more efficient way to do this tell me --- src/main/java/Main.java | 50 +---------------------------------------- 1 file changed, 1 insertion(+), 49 deletions(-) diff --git a/src/main/java/Main.java b/src/main/java/Main.java index 4890e14..d758b4d 100644 --- a/src/main/java/Main.java +++ b/src/main/java/Main.java @@ -16,52 +16,4 @@ public static void main(String[] args){ System.out.println("We're sorry. We don't like you. You don't get a greeting. Have a nice day."); } } -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -/* -public class Main{ - public static void main(String[] args){ - Scanner input = new Scanner(System.in); - System.out.println("Please enter your name"); - String usersName = input.nextLine(); - if (usersName.equalsIgnoreCase("Alice") || usersName.equalsIgnoreCase("bob")){ - System.out.println("Sup, " + usersName); - } else { - System.out.println("Sorry. We don't like you. You don't get a greeting. Have a nice day."); - } - } - - -} - -*/ +} \ No newline at end of file From ed93454ad22ec296b0e2827411e83815fd4adbda Mon Sep 17 00:00:00 2001 From: Amy Gill Date: Sun, 18 Feb 2018 16:10:58 -0500 Subject: [PATCH 5/5] added the word 'personal' --- src/main/java/Main.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/Main.java b/src/main/java/Main.java index d758b4d..ce698a8 100644 --- a/src/main/java/Main.java +++ b/src/main/java/Main.java @@ -13,7 +13,7 @@ public static void main(String[] args){ if(usersName.equalsIgnoreCase("alice") || usersName.equalsIgnoreCase("bob")){ System.out.println("Sup, " + usersName); } else { - System.out.println("We're sorry. We don't like you. You don't get a greeting. Have a nice day."); + System.out.println("We're sorry. We don't like you. You don't get a personal greeting. Have a nice day."); } } } \ No newline at end of file