Skip to content
/ Bot Public

A simple, not so smart chat bot. Welcome late 1980s!

Notifications You must be signed in to change notification settings

astraindev/Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Bot

The lab text says:

Create your own exceptions and test them. Add to Github

Feel free to talk to the Bot. It has a very limited amount of phrases. If you give it a phrase that it doesn't understand, it recites poetry to you. Check out the Bot.java file in the chat method for the list of phrases that it understands.

To exit, press the EOF character on your keyboard. On macOS/Linux it is CTRL-D. On Windows, it is CTRL-Z followed by the Enter key.

Note: IDE terminals, such as IntelliJ IDEA and Eclipse, do not parse END-OF_FILE (EOF) properly, or they just screw up for no apparent reason. Please run via cmd (Windows) or terminal (macOS/Linux).


Quick Install and Run

  1. Get the JAR file from the Releases section.

  2. Run it:

    java -jar Bot-1.0.jar
    

Command Line Instructions

Be sure you have Maven installed to follow these instructions.

  1. Clone this repo.

  2. To create the JAR file, type:

    mvn package
    
  3. Then run it by typing:

    java -jar target/Bot-1.0.jar
    

Exceptions

The lab is about exceptions. Conversion with the Bot is as follows:

  1. Get input from user
  2. Parse input
    • Throw an exception if the user enters any naughty words
  3. Given the parsed input, allow the Bot to chat with the user
    • Throw an exception if the input is not parsed

The JUnit test cases cover these exceptions.

About

A simple, not so smart chat bot. Welcome late 1980s!

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages