Question: Programming Assignment 3 The Mad Lib Generator Mad Libs are fun little story templates with spaces left for the reader to fill in his or
Programming Assignment 3 The Mad Lib Generator Mad Libs are fun little story templates with spaces left for the reader to fill in his or her own words, often with comical results.
In this assignment, were going to create our own Mad Libs with the assistance of Java and ArrayLists.
Program requirements:
Create a new class called MadLib.java
Your program should print a Mad Lib of your choosing. (You can use an existing one or create your own). The Mad Lib should have a minimum of 15 empty spots to fill
For each empty spot, your program should pull a random word from an ArrayList. Create an ArrayList for the following. (This is at a minimum. Feel free to add more categories as needed.):
o Nouns
o Verbs
o Adjectives
o Names
o Places
Each ArrayList should have a minimum of 15 entries to pick from. These entries should be read from an external file and placed in the ArrayList at runtime. You will have one external file for each category (e.g., nouns.txt, verbs.txt, etc.)
Each spot should be filled with a randomly selected item from the appropriate list. For example, if the spot needs a noun, pull an item from the Nouns ArrayList. If the word chosen was used in a previous spot, discard this word and pick another (hint: use the Math.random() and ArrayList contains() functions for this)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
