ITEC 120
HW4: Wheel of Fortune

Academic Integrity

Be reminded that this homework assignment must be your own work.

Objectives

After successfully completing this assignment you will be able to work with loops and String methods.

Assignment

Develop a program named Wheel.java which simulates a simple Wheel of Fortune style word game. Your program will prompt the user for phrase, then create and print a puzzle with blanks in place of letters, and punctuation filled in. The program will then prompt the user to guess letters until the puzzle is solved.

Here's a sample run (user input in red) :

Enter a phrase: Westward, Ho!


_ _ _ _ _ _ _ _ , _ _ !

Guess a letter: E

_ E _ _ _ _ _ _ , _ _ !

Guess a letter: s

_ E S _ _ _ _ _ , _ _ !

Guess a letter: t

_ E S T _ _ _ _ , _ _ !

Guess a letter: w

W E S T W _ _ _ , _ _ !

Guess a letter: a

W E S T W A _ _ , _ _ !

Guess a letter: r

W E S T W A R _ , _ _ !

Guess a letter: n

W E S T W A R _ , _ _ !

Guess a letter: o

W E S T W A R _ , _ O !

Guess a letter: h

W E S T W A R _ , H O !

Guess a letter: d

W E S T W A R D , H O !

Hooray! It took you 10 guesses.

 

Hints and tips

 

Submit Your Assignment

Submit Wheel.java to the to the HW4 dropbox on D2L.