A program that plays a guessing game
- The program will secretly select a number between 1 and 100 (or a 1 and 1000 if you want it to be a little more challenging.)
- It will prompt the use for a guess. The user starts with 10 points and gets 10 guesses
- After each guess the program will tell the user whether the guess is too high, too low, or correct. If correct the game end. Each wrong guess subtracts a point. After the last guess, or a correct guess, the program prints out the secret number and the score.
- This program will test your use of Loops and branches as well as basic prompts, inputs and assignments. You can work on the program until it works--there is no time limit despite the due date.
- Selecting a random number: 10 points
- Variables and assignments: 10 points
- Naming conventions: 10 following standard naming conventions for variables.
- Inputs: 10 (this includes a prompt explaining the game, prompting for a guess,)
- Outputs: 10 (outputting results of quesses (high,low, correct) and outputting the score at the end)
- Loops: 25 points (The game itself will need to couched in a loop, for extra credit (5 points) you can make it so when the game is over it asks if they want to play another game.)
- Branches: 25 (testing the guesses, determining if the guess matches the secret number)
- scoring: 10 (subtracting one for each wrong answer. Maintaining the score outside the loop)
- Total 100 points
Java 11 SDK
Maven
To run the program run the following command in the terminal:
mvn spring-boot:run
`