Growing Madlibs Code Challenge
Increment 5.1 ** New features outlined in 1b and 3.
-
Uses a class to:
a. Gather the following parts of speech from the user (each can be a word or phrase): Noun Adjective Verb Adverb Object
b. (New Feature) Gather a mode of transportation via a multiple choice prompt. (If an improper number is detected, the user gets a pre-determined mode of transportation).
b. Store all of these in a hash where the key is the name of the part of speech. For example, "noun," "verb," or "transport."
-
Stores the hash values outside the class
-
Creates an array with four sentence templates. New: one more template added in this increment, which includes the new mode of transportation, and one of the older templates now includes this mode of transportation.
-
Uses another class to insert the hash values into the sentence templates
-
Prints the completed sentences and exits