Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a Java class Guess.java with the following criteria: -Instance variables,

ID: 3629341 • Letter: W

Question

Write a Java class Guess.java with the following criteria:
-Instance variables, sercretNumbers (an int), which is the number the user is trying to guess,guessLimit (an int), which is the maximum number of guesses a user can make, and numGuess (an int), which is the number of guesses the user has taken.
-Methods, the usual getters and setters for both instance variables as well as a userGuess method that takes as an argument a user’s guess fo r the secret number, prints out whether the user’s guess is too high or too low or correct.
Write a tester class GuessTester.java to test your Guess class. The tester class should construct a Guess object and set the secret number to a value you choose (that is, it is fixed in the program and you don’t need a random number generator). Also set the guessLimit to be 4. The tester should then use the Scanner class to get guesses from the user. The program should keep looping until the user gets the secret number correct and prints out the number of guesses it took to correctly guess it, or reaches the guessLimit of guesses. Guesses should be checked by calling methods of the Guess object, not by explicit comparison in the GuessTester.java. The Only place your secrect number should be is hardcoded is when setting it initially setting it after creating your Guess object

Explanation / Answer

}

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote