Class Magpie5

java.lang.Object
  extended by Magpie5

public class Magpie5
extends java.lang.Object

The completed version of the Magpie activity 5. A program to carry on conversations with a human user. This version:

This version uses an array to hold the default responses.


Constructor Summary
Magpie5()
           
 
Method Summary
 java.lang.String getGreeting()
          Get a default greeting
 java.lang.String getResponse(java.lang.String statement)
          Gives a response to a user statement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Magpie5

public Magpie5()
Method Detail

getGreeting

public java.lang.String getGreeting()
Get a default greeting

Returns:
a greeting

getResponse

public java.lang.String getResponse(java.lang.String statement)
Gives a response to a user statement

Parameters:
statement - the user statement
Returns:
a response based on the rules given