You have been asked to create a guessing game with four players. The players will be asked to guess which word will be selected next and earn points for each correct guess." The game works as follows: First: At the start of the game: Each of the four players is asked to enter their name and the amount of money they wish to bet on the game (only positive values less than $100 are allowed). The total of all four bets is the price money for the game. •The players will be asked to select which set of words they wish to use for the game. The options are: Fruit Colors Animals Each set of words must have at least seven options (You may choose your own words for each set). Once the players select a set of words the computer will display the full list of options. For example: You have selected the Fruit word set. The possible words are: Apple, Orange, Banana, Kiwi, Strawberry, Grape, Cherry Second: Each game will consist of seven rounds. Each round goes as follows:             Each player is asked to pick a word from the set of words selected. Two or more player may choose the same word.             The computer will then randomly choose a word to select and display the word to the players. For example: The word is: Kiwi If a player guessed the correct word they will earn one point. Third:  After all seven rounds are played: The player with the most points is declared the winner. The computer will display the winner's name and the amount of money they have won. For example: Congratulations Megan, you are the winner. You have won $60.00. If there is a tie: The price money is divided evenly between each of the winning players. The winners' names and the amount of money they won (per player) will be displayed.  For examples: Congratulations Anne, Bob and Clara, you are the winners. You have each won $20.00. The computer will then record the game in the file GuessGameRecord.txt. The file will contain a record for each game played using the program. A game record should include the word set select, the total of the bets, the name/s of the winner/s and the amount each winner/s won For example: Fruit 60.00 Anne, Bob, Clara 20.00 Remember, the program should not delete the current contents of the file. Instead, it should add the current game to the end of the file. . Fourth: The players will then be asked if they want be play again: If yes, the players will be asked to enter new bets (they will not need to re-enter their names) and the game will start with the players select the set of words. If no, the computer will close the program . Fifth: You will create a Java application that implements this card game. Save your program in the file WordGuessing Game.java. Your program must use at least three unique methods (though you are encouraged to use more) to implement the game. Each method must have a documentation (JavaDoc, /**) comment which describes how to use the method. Remember to use @param and @return when needed. Your program must include input validation for the user inputs (where required). Use descriptive variable and method names throughout your program, along with good programming style.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
icon
Concept explainers
Question

"You have been asked to create a guessing game with four players. The players will be asked to guess which word will be selected next and earn points for each correct guess."

The game works as follows:

First: At the start of the game:

Each of the four players is asked to enter their name and the amount of money they wish to bet on the game (only positive values less than $100 are allowed). The total of all four bets is the price money for the game.

•The players will be asked to select which set of words they wish to use for the game. The options are:

Fruit

Colors

Animals

Each set of words must have at least seven options (You may choose your own words for each set). Once the players select a set of words the computer will display the full list of options.

For example:

You have selected the Fruit word set. The possible words are: Apple, Orange, Banana, Kiwi, Strawberry, Grape, Cherry

Second: Each game will consist of seven rounds. Each round goes as follows:

            Each player is asked to pick a word from the set of words selected. Two or more player may choose the same word.

            The computer will then randomly choose a word to select and display the word to the players. For example:

The word is: Kiwi

If a player guessed the correct word they will earn one point.

Third:  After all seven rounds are played:

The player with the most points is declared the winner. The computer will display the winner's name and the amount of money they have won.

For example:

Congratulations Megan, you are the winner. You have won $60.00.

If there is a tie:

The price money is divided evenly between each of the winning players. The winners' names and the amount of money they won (per player) will be displayed.

 For examples: Congratulations Anne, Bob and Clara, you are the winners. You have each won $20.00.

The computer will then record the game in the file GuessGameRecord.txt. The file will contain a record for each game played using the program.

A game record should include the word set select, the total of the bets, the name/s of the winner/s and the amount each winner/s won

For example:

Fruit 60.00 Anne, Bob, Clara 20.00

Remember, the program should not delete the current contents of the file. Instead, it should add the current game to the end of the file. .

Fourth: The players will then be asked if they want be play again:

If yes, the players will be asked to enter new bets (they will not need to re-enter their names) and the game will start with the players select the set of words.

If no, the computer will close the program .

Fifth: You will create a Java application that implements this card game. Save your program in the file WordGuessing Game.java. Your program must use at least three unique methods (though you are encouraged to use more) to implement the game. Each method must have a documentation (JavaDoc, /**) comment which describes how to use the method. Remember to use @param and @return when needed. Your program must include input validation for the user inputs (where required). Use descriptive variable and method names throughout your program, along with good programming style.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Control Structure
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education