Created
October 2, 2018 00:52
-
-
Save memish/c6b91106e1f72d649ee8972ebcab7476 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
/** | |
* A simple class to run the Magpie class. | |
* @author Laurie White | |
* @version April 2012 | |
*/ | |
public class MagpieRunner2 | |
{ | |
/** | |
* Create a Magpie, give it user input, and print its replies. | |
*/ | |
public static void main(String[] args) | |
{ | |
Magpie2 maggie = new Magpie2(); | |
System.out.println (maggie.getGreeting()); | |
Scanner in = new Scanner (System.in); | |
String statement = in.nextLine(); | |
while (!statement.equals("Bye")) | |
{ | |
System.out.println (maggie.getResponse(statement)); | |
statement = in.nextLine(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment