akosiraff

Download: GuessGame Java

Jan 30th, 2013
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1.  
  2. Download: http://solutionzip.com/downloads/guessgame-java/
  3. Write a program GuessGame.java that plays the game “guess the
  4. number” as follows: Your program chooses the number to be guessed
  5. by selecting an integer at random in the range 1–1000. The
  6. program then displays the following in a label:
  7. I have a number between 1 and 1000 can you guess my number?
  8. Please enter your first guess.
  9. A JTextField should be used to input the guess. As each guess is
  10. input, the background color should change to either red or blue.
  11. Red indicates that the user is getting “warmer,” and blue
  12. indicates that the user is getting “colder.” A JLabel should
  13. display either “Too High” or “Too Low” to help the user zero in
  14. on the correct answer. When the user gets the correct answer,
  15. “Correct!” should be displayed, and the JTextField used for input
  16. should be changed to be uneditable. A JButton should be provided
  17. to allow the user to play the game again. When the JButton is
  18. clicked, a new random number should be generated and the input
  19. JTextField changed to be editable
  20.  
  21. Download: http://solutionzip.com/downloads/guessgame-java/
Add Comment
Please, Sign In to add comment