Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In JAVA Please: You are to create the classic game of Wheel of Fortune. Your application should consist of 3 players, underlines to represent letters

In JAVA Please:

You are to create the classic game of Wheel of Fortune. Your application should consist of 3 players, underlines to represent letters in the puzzle, and the available letters. The initial screen should look something like this:

Welcome to the Wheel of Fortune

Available letters - ABCDEFGHIJKLMNOPQRSTUVWXYZ

Here is the puzzle (Song):

__ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __

Player 1 would you like to Spin (1) or Guess (2) the puzzle? __

**Note: My puzzle is SOMEWHERE OVER THE RAINBOW but pick your own puzzle**

Notice that Player 1 goes first and can either spin or guess the puzzle by typing a 1 or 2.

If Player 1 spins, then the wheel will spin. To represent the wheel, create a random number from 1 to 10. Each will represent a spot on the wheel. Here are the wheel values:

Random number 1: $100

Random number 2: $300

Random number 3: $500

Random number 4: $700 ** Put these dollar values into an array

Random number 5: $900

Random number 6: $2000

Random number 7: $3000

Random number 8: $5000

Random number 9: -$1000

Random number 10: $0

So, if Player 1decides to spin (by typing 1), and the random number generated is 4, then the value is $700 (note that if a player enters a bad entry like T, use exception handling so the game does not crash and display a message on the screen to tell the player that this is not a valid input). Display this amount and ask Player 1 for a letter. Your screen should now look something like this:

Welcome to the Wheel of Fortune

Available letters - ABCDEFGHIJKLMNOPQRSTUVWXYZ

Here is the puzzle (Song):

__ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __

Player 1 would you like to Spin (1) or Guess (2) the puzzle? _1_

You landed on $700.

Select your letter from the available letters from above: __

Lets say Player 1 chooses the letter H. It is in the puzzle and it appears twice. Therefore display the letter H in the correct position in the puzzle, take this letter off the available letter list, add dollar value total to player 1 (in this case it would be $1400 since it appears twice). **Also keep the dollar amounts for each player in one array obviously, it should be an array of 3 elements** Ask Player 1 to spin or guess the puzzle. It should look something like this (Its OK to re-draw the screen):

Available letters ABCDEFG IJKLMNOPQRSTUVWXYZ

Here is the puzzle (Song):

__ __ __ __ __ _H_ __ __ __ __ __ __ __ __ _H_ __ __ __ __ __ __ __ __

Player 1 would you like to Spin (1) or Guess (2) the puzzle? __

If Player 1 gives an incorrect letter, display Incorrect on the console, take this letter off the available letter list, and now ask Player 2 to Spin or Guess. Remember that player 1 does not lose any money for incorrect guesses. If Player 2 spins, generate a random number again between 1 and 10 to get the value. The game continues this way for 3 players until someone guesses the puzzle.

If a player decides to guess the puzzle, prompt the player for the answer. If the answer is correct, display a great message telling that player that he/she is the winner and also display the total money won. If the guess is incorrect, display an Incorrect message and continue the game.

Note: If a player lands on random number 9, that player loses $1000 from his/her total and loses that turn. If a player lands on random number 10, that player only loses that turn but does not lose any money. All other random numbers have positive dollar values.

** Make sure to use at least 3 other methods other than the main method. For example:

drawBoard() to display the puzzle

spin() to generate the random number representing the wheel

updatePlayer Amt() to update the amount in the player amount array described above

These are the objectives met for this project:

Decision Structures

Loops

Methods

Arrays

Random number generation

Exception handling

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions