Program 1, Mad Lib Letter

Short Description

Write a program that allows a user to play a Mad Lib game.

Goals

When you finish this program you should have

Full Description

Mad Libs are a simple word game played between a story teller and a participant. The game begins with the story teller selecting a mad lib. The mad lib consists of a story containing a series of blanks, each of which has an associated description. The story teller then asks the participant for a word, matching the given description to fill in each blank. Once this is completed the story teller reads the story filling in the blanks with the participant's answers.

For this program, the computer is to assume the role of the story teller and the user is to assume the role of the participant. There is only one mad lib available for this game. While it contains six blanks, the participant should only be asked for four different answers. Some answers are used twice in the story.


Mr. M. Palin
Owner, name of a business
location, England

Dear Mr. Palin,
I am writing  this letter to complain about the service at 
your name of a business.
I recently purchased a type of animal at this boutique.  Once
I returned home, I discovered that the type of animal was 
quite dead.  When I tried to return it, the clerk said that it was 
not dead, merely present continuous verb.  I assure you that this 
type of animal is not present continuous verb but is indeed 
quite dead.

I appreciate your quick resolution of this matter.

Sincerely,

J. Cleese.

For this madlib, you should ask for the following items in the following order.

In this case, a word is a collection of characters containing no spaces, while a phrase is one more words and may contain a space. For example

Bob the Builder is a phrase.
purple is a word.

Once the input has been obtained, tell the story.

Discussion

Required Files

A single file containing the source code for this program.

Submission

Submit the assignment to the D2L folder Homework 1 by the due date..