Chattering Chatterbot Download

Christina Cacioppo

classes, inheritance Polish needed


Computers can do many things, but they're not very good at carrying on a conversation – unless we teach them how to do so.

Chatterbots are programs designed to talk, or chatter, away. Eliza, SmarterChild, and Parry are famous chatterbots of times past. Let's make our own chatterbot.


Let's make a basic chatterbot first. We'll want to build a chatterbot class with:

  1. A way to construct a new Chatterbot.
  2. Every chatterbot knowing its own name
  3. void sayHello(), void sayGoodbye(), void continueConversation(), and void waitForResponse() methods

Starter code

class Chatterbot{

Expected output

The precise implementation is up to you, but as one example, running this script:

Chatterbot chatters = new Chatterbot();
String response = chatters.waitForResponse();
should produce something like this, where the chatterbot is in black and the user is in blue.

"Hi there!"
"Is that so?"
"Er, I think so?"
"Yes! I just said hello!"
"You wouldn't say?"
"I had no idea."

(No need to follow this Chatterbot exactly; give yours its own speaking style!)


Useful tools to solve the problem

Related links