exerciseMarch1908

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 programs choice...
View Full Document

This note was uploaded on 04/14/2008 for the course COMP 202 taught by Professor Verbrugge during the Winter '07 term at McGill.

Ask a homework question - tutors are online