diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index 5d313334cc..e1639f426a 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -1,3 +1,5 @@ +import java.util.Scanner; + public class Duke { public static void main(String[] args) { String logo = " ____ _ \n" @@ -6,5 +8,22 @@ public static void main(String[] args) { + "| |_| | |_| | < __/\n" + "|____/ \\__,_|_|\\_\\___|\n"; System.out.println("Hello from\n" + logo); + System.out.println("What can i do for you?"); + + Scanner input = new Scanner(System.in); + + boolean isListening = true; + while(isListening) { + String command = input.nextLine(); + + if (command.equals("bye")) { + System.out.println("Bye. Hope to see you again soon!"); + isListening = false; + } + + else { + System.out.println(command); + } + } } }