Many of us as children were taken on seemingly unendurable car rides and thought we'd die of boredom. Let's face it, you can play the ABC game for only so many miles. Then someone would pull out a Mad Libs® book and smiles would erupt on everyone's faces as hilarity ensued. These wonderful word games are part of the fabric of Americana, and have also spurred many imitations and comedic references.
(If this doesn't ring a bell, you should read more about them and play some online to get a feel what they are.) The Challenge
We would like to create some fun, online Mad Libs®. There is real room for creativity here -- the lexical categories can be as standard as nouns, verbs and adjectives or be as creative as professor's name, canned meat, and favorite Monty Python actor. In general, however, the more general your blanks are, the more creative and hilarious your finished story will be.
We want you to randomly generate one of (at least) 5 different Mad Libs® sentences. That is, you'll write a Java program that asks the user for different blanks (you might ask for a noun, verb and adjective the first time, and a verb, adverb and pronoun the second time, etc.) and then creates a Mad Lib® based on the response. Your randomization has to involve the types of lexical categories, and not just different output sentences with the same categories. E.g., you can't always ask for a noun and a verb and have template sentences that just use those two categories, like:
Officer, I swear the NOUN said I needed to VERB in order to pass the DMV test!
Momma always told me not to VERB the NOUN
In order to VERB, one must pet the NOUN first!