ZCW-MicroLabs-JavaFundamentals-TooLargeTooSmall

Guessing Game; Too Large Too Small

Objective:

  • Write a guessing game which prompts a user to guess a mystery number within some range.
  • After every guess the program should display some variation of "too large", "too small", "correct guess", respectively.
  • Upon termination, the program should display the number of guesses before successfully guessing correctly.
  • A number that is input consecutively, should register as a single guess.

Purpose:

  • To establish familiarity with
    • Control Flow
    • Conditionals
    • User input
    • The Random class
    • Object instantation/declaration
    • Method invokation

Resources:

Unit Test

No Unit Test

What's Next?

  • The next lab can be found here