Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please create a program in Java with the following guidlines: You have been hired by SDLC Gaming. Their goal is to create a number guessing

Please create a program in Java with the following guidlines:
You have been hired by SDLC Gaming. Their goal is to create a number guessing game against the CPU.
I.
Game Objective:
The game will start by generating a random number to be guessed by both the user and CPU. The user will get 1 guess per round and the CPU will receive a predetermined number of guesses; this number can change. The first player to guess the number correctly wins!
II.
CPU Difficulty:
The user will be able to set or determine the number of guesses the CPU can make at the start of each game. There will be 3 possible modes to set a CPU's guesses to:
Easy allows the CPU to make 5 guesses per round.
Medium allows the CPU to make 10 guesses per round.
Hard allows the CPU to make 20 guesses per round.
*I encourage you to create your own names for settings (3)*
III. User/CPU Guesses:
Each time the user guesses a number, information regarding the guess will be provided:
If the guess is too high display "Too High"
If the guess is too low display "Too Low"
If the guess is correct display "Correct!"
If the user guess is incorrect the CPU will make a predetermined number of guesses (5,10 or 20).
Each guess made by the CPU will be done by generating a random number.
IV. Scoreboard:
Reward 1pt to the winner of each game. Display a scoreboard after each game.
V. Game Duration:
The game will continue until the correct number is guessed by the user or CPU. The program will continue until the user chooses to exit the program.
image text in transcribed

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