Question: For this assignment you will write an application that plays guess my number using BASIC GUI elements. This is your first adventure in thinking about

For this assignment you will write an application that plays guess my number using BASIC GUI elements. This is your first adventure in thinking about and designing a program using standard Graphic User ( this means input and output screens ONLY the rest will come later) Int Interface elements in a way that uses the old childrens game! At the end of this assignment, you should have worked with, and now be familiar with, these standard Java elements.
To do this, rely on the chapter and material posted. ALL relevant elements can be found there. You may also use the internet to find any example that might be helpful to you as well.
The game design requirements are:
The program should select a random number from 1 to 1000. The program should then ask the user to guess a number from 1 to 1000. A JTextField can be used for the guesses.
After each guess is input, the background color of the box should change to either blue (for cold or low) or red (for hot or high) along with a label that tells the user if they were too high or too low. When the user finally guesses the right answer, the color should be green and the box should change to uneditable. The game should ask the user if they want to play again. You should investigate on your own how to do this.
At the end of each round of play, the number of guesses it took to get the number correct should be recorded, along with the time it took using the one of the String building methods. When the user indicates that they would like to stop playing the game, the relevant statistics should be displayed in a dialog box before the program ends...so the user knows for each round played, how many guesses it took and the time it took to get the right answer. They should hit OK on this box to end the program and the game entirely.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!