Java Reference
In-Depth Information
If the name is found, the program should display data about the name on the screen:
Statistics on name "Sam"
1900: 58
1910: 69
1920: 99
1930: 131
...
This program is more fun and challenging if you also draw the name's popularity on a DrawingPanel as a
line graph. Plot the decades on the x -axis and the popularity on the y -axis.
5. Write a program that plays a game where a player is asked to fill in various words of a mostly complete story with-
out being able to see the rest. Then the user is shown his/her story, which is often funny. The input for your program
is a set of story files, each of which contains “placeholder” tokens surrounded by < and > , such as:
One of the most <adjective> characters in fiction is named
"Tarzan of the <plural-noun> ." Tarzan was raised by a/an
<noun> and lives in the <adjective> jungle in the
heart of darkest <place> .
The user is prompted to fill in each of the placeholders in the story, and then a resulting output file is created with the
placeholders filled in. For example:
Input file name? story1.txt
Please enter an adjective: silly
Please enter a plural noun: socks
Please enter a noun: tree
Please enter an adjective: tiny
Please enter a place: Canada
The resulting output story would be:
One of the most silly characters in fiction is named
"Tarzan of the socks ." Tarzan was raised by a/an
tree and lives in the tiny jungle in the
heart of darkest Canada .
 
Search WWH ::




Custom Search