{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

cs31s11extra

cs31s11extra - CS31 Introduction to Computer Science I...

This preview shows pages 1–2. Sign up to view the full content.

CS31: Introduction to Computer Science I Spring 2011 Copyright Brian Choi 2011. All Rights Reserved. 1 Bonus Problem TA: Brian Choi ([email protected]) Section Webpage: http://www.cs.ucla.edu/~schoi/cs31 In this problem, we will create a word puzzle manager for the game of Wheel of Fortune, by constructing a WheelOfFortune class. In the case you have never watched this show (which I think is rare), think of it as a hangman game, where you have a word puzzle and keep guessing letters that appear in the puzzle until you figure out the puzzle. Here, a (word) puzzle is a phrase or a sentence in English that consists only of alphabets and spaces. For example, “ Los Angeles Lakers ” is a valid puzzle, while “ Philadelphia 76ers ” is not. A puzzle can be arbitrarily long. If the puzzle is “ Los Angeles Lakers ”, before solving the problem, it appears as “ ### ####### ###### ” (the unsolved portion of the puzzle appears as # s). When a contestant’s guess is S , it then alerts the user that there are three S ’s in the puzzle, and replaces the corresponding # s in the puzzle with S , which thus becomes “ ##S ######S #####S ”. At any time, the contestant can try to solve the puzzle.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 3

cs31s11extra - CS31 Introduction to Computer Science I...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online