Assignment 7 Shakespearean Insult Generator
Maximum Points = 50
The purpose of this lab is to introduce you to arrays and ArrayLists and continue the use of loops, and the Scanner, File classes and conditional (decision) statements in the Java programming language. Your program will generate insults in the Elizabethan vernacular of Shakespeare. [see http://www.pangloss.com/seidel/Shaker/ and http://www.william-shakespeare.org.uk/a2-shakespeare-insult-generator.htm for examples]
As a new student intern at the CHattahoochee valley Arts and Origami Society (CHAOS), you have been asked to write S.I.G. (Shakespearean Insult Generator), a program that generates insults using words and phrases that might have been used by Shakespeare (e.g. Eat my knickers, Thou saucy swag-bellied dewberry!.) Each insult will have four parts: a phrase followed by the word Thou, followed by two adjectives and a noun. Your program will read data from four text files containing the phrase and word lists. Your program will allow the user to continue to use S.I.G. to generate insults until the user tells the program to stop.
v Your program must read the data from the files called phrases.txt, adj1.txt, adj2.txt, and nouns.txt with one phrase or word per line.
v Your program must randomly select a different phrase or word for each part each time an insult is displayed.
HINT: Modularize as much code as possible.
EXTRA CHALLENGES:
· Use an Applet with a GUI like http://www.petelevin.com/shakespeare.htm
Make sure that your program uses proper indentation and complete documentation. See http://csc.columbusstate.edu/summers/NOTES/1301/style.htm for guidelines.
The program heading should occur at the top of the program and should include:
/**
* PROGRAM SPECIFICATIONS
* NARRATIVE DESCRIPTION:
*
* @author (your name)
* @version (date)
*/
(Due before 8 a.m. on Friday, December 2, 2011) Submit your .java files containing your program and your timesheet documenting your time to the dropbox in WebCT..
Grades are determined using the following scale: