Difference between revisions of "Mad Lib"
From CompSciWiki
Line 2: | Line 2: | ||
|ProblemName=Mad Lib | |ProblemName=Mad Lib | ||
− | |Problem= | + | |Problem=Lets create a program which takes some text input from a user and then makes a Mad Lib out of it. |
+ | We're going to look at making this application using JOptionPane with both input and output. | ||
|SolutionCode=<pre> | |SolutionCode=<pre> | ||
Line 24: | Line 25: | ||
// plural noun country verb noun | // plural noun country verb noun | ||
− | + | JOptionPane.showMessageDialog("The " + pluralNoun + " in " + country + " like to " + verb + " the " + noun + "."); | |
− | + | ||
} | } | ||
} | } |
Revision as of 17:08, 5 April 2010
Back to the Program-A-Day homepage
ProblemLets create a program which takes some text input from a user and then makes a Mad Lib out of it. We're going to look at making this application using JOptionPane with both input and output. |
...by studentsAn image or By Students section | |
---|---|---|
SolutionThe solution... | ||
Code |