{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}


exerciseMarch1908 - catch clause After the user indicates...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
COMP202 Instructor: Ladan Mahabadi March 19, 2008 Word game: In this word game, the user enters a collection of words of a certain minimum length which will be added to an array list. Your program then picks a word at random and prompts the user to choose a word until user’s choice is what the program has picked. Your program needs to: Prompt the user for the acceptable minimum length of the entries Ask the user to enter words until the user quits If the length of the word is shorter than the minimum, display an error message (in your
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: catch clause) After the user indicates that all words have been entered by quitting this menu, random pick a word out of the collection of words (stored in an ArrayList called words) Continue prompting the user for choice word until either the user quits or he enters the same choice word Finally, display how many rounds it took the user to guess your program’s choice...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online