From ca8ac005d3a456d9bf37655a630d641c90fbd4c1 Mon Sep 17 00:00:00 2001 From: Sandy Setiawan Date: Wed, 5 Feb 2020 20:33:22 -0500 Subject: [PATCH] AliceandBob Sandy Setiawan --- AliceAndBobEngine.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/AliceAndBobEngine.java b/AliceAndBobEngine.java index 0c0006e..bc98afa 100644 --- a/AliceAndBobEngine.java +++ b/AliceAndBobEngine.java @@ -16,6 +16,15 @@ public class AliceAndBobEngine //HINT: LOOK AT THE TESTS TO SEE WHAT IS EXPECTED FOR DIFFERENT CONDITIONS public String evaluateAliceOrBob(String input) { + if ("Alice".equals (input)){ + return "Hello Alice"; + } else if ("Bob".equals (input)){ + return "Hello Bob"; + } else if (!"Alice".equals (input)) { + return "I DON'T KNOW YOU, YOU ARE SCARY"; + } else if (!"Bob".equals(input)) { + return "I DON'T KNOW YOU, YOU ARE SCARY"; + } return result; }