The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 4 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
Create a console based guessing game in Java. View the attached GuessingGame.docx for more information.
In Java build a command-line number guessing game.RequirementsFirst, create a “Player” class. This class will contain a feld that will hold theplayer’s name, a feld that tracks the player’s number o± wins (correct guesses), a feld thattracks the number o± incorrect guesses, and have methods to get, set, and construct theobject appropriately.The game’s underlying structure will rely on a circular linked-list. Build theNode class ±rom scratch.Per±orm the game logic in an abstract, behind a GuessingGame class.oHow does the game work?Prompt the user ±or the number o± players that want to play your game.Prompt each player to enter their name. Create a new Player object ±or eachplayer, add it to a Node, and then link it into the list.Once all o± the players are added choose a random number between 1 and100 and start playing. Each player gets 1 guess and then the next player gets a turn. Theplayer that guesses the number wins. The players continuing taking turns in a “circular”±ashion until one o± them wins. Pay special attention to this interaction.For each turn a player can guess a number, a player can choose to leave thegame and be removed ±rom the linked-list, or a player can choose to skip their turn andallow a new player to join in the game and be added to the linked-list. There will need to bea small menu system to handle this interaction. I± there is only 1 player le±t in the list, thatplayer is the winner.Once a player is declared the winner, prompt them i± they’d like to play again.I± so, immediately start the next game with the existing players. The player that won theprevious game will now go frst. I± they choose to not play again then show the statistics ±oreach player during the run o± games just played (total games played, wins, losses, etc.) andthen exit the program.oOther rulesKeep track o± the numbers already guessed. I± a player chooses a number thathas already been guessed they lose their next turn (they are skipped).I± a player guesses a number that is evenly divisible by the randomly selectednumber then the game will reverse itsel± and go in the opposite direction. This requires theuse o± a doubly linked-list.Build the game so you can play the game by yoursel± against the computer.This means the program should ask i± the player wants to play single or multi-player. I± theyselect single-player the game should randomly generate 2 to 6 computer competitors(including random names). In single-player mode guessing numbers is the only optionallowed on each turn. Players can’t leave or join the game.
Attachments:
-----------