java.lang.Object | +--aipj.assignment1.chat.ChatBot
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.
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 |
public ChatBot()
Method Detail |
public java.lang.String getDescription()
public java.lang.String getName()
public java.lang.String reply(java.lang.String remark)
remark
- The comment which must be responded to
public void setDescription(java.lang.String string)
string
- The textual description of the botpublic void setName(java.lang.String string)
string
- The name of the botpublic java.lang.String startConversation()