aipj.assignment1.chat
Class ChatBot

java.lang.Object
  |
  +--aipj.assignment1.chat.ChatBot

public class ChatBot
extends java.lang.Object

A class representing a digital persona known as a chat bot. The chat bot can start conversations and reply to remarks.

Used in AIJP assignments 1 and 2.

Author:
Judy Robertson

Constructor Summary
ChatBot()
          Create a ChatBot, initialise the language generator
 
Method Summary
 java.lang.String getDescription()
          Gets the textual description of what the chat bot looks like and its personality
 java.lang.String getName()
          Gets the name of the chat bot
 java.lang.String reply(java.lang.String remark)
          Generate a response to the specified remark
 void setDescription(java.lang.String string)
          Sets up the textual description of the chat bot's appearance and personality
 void setName(java.lang.String string)
          Sets up the name of this digital persona
 java.lang.String startConversation()
          Initiate a conversation about any topic.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChatBot

public ChatBot()
Create a ChatBot, initialise the language generator

Method Detail

getDescription

public java.lang.String getDescription()
Gets the textual description of what the chat bot looks like and its personality

Returns:
A textual description of the chat bot

getName

public java.lang.String getName()
Gets the name of the chat bot

Returns:
The name of this digital persona

reply

public java.lang.String reply(java.lang.String remark)
Generate a response to the specified remark

Parameters:
remark - The comment which must be responded to
Returns:
A sentence which represents a reply to the specified remark

setDescription

public void setDescription(java.lang.String string)
Sets up the textual description of the chat bot's appearance and personality

Parameters:
string - The textual description of the bot

setName

public void setName(java.lang.String string)
Sets up the name of this digital persona

Parameters:
string - The name of the bot

startConversation

public java.lang.String startConversation()
Initiate a conversation about any topic. Generate a starting sentence

Returns:
A sentence with which to start a conversation