In Java, code and make sure to following the program requirements:
This program is a "guessing game" program. The program will generate a random integer between 1 and 10000, inclusive. The program should prompt the user to enter a guess. For each guess, the program will output ‘HIGHER’ if the user's guess is lower than the target, ‘LOWER’ if the user's guess is higher than the target, or ‘WINNER’ if the user guesses the target. Each time the program prompts the user for a new guess, it should calculate and display the eligible range of values.
Sample output:
Please enter a number between 1 and 10000: 5000
Your guess is too high, try again.
Please enter a number between 1 and 5000: 2500
Your guess is too high, try again.
Please enter a number between 1 and 2500: 1500
Your guess is too low, try again.
Please enter a number between 1500 and 2500: 2000
Your guess is too high, try again.
Please enter a number between 1500 and 2000: 1600
Your guess is too low, try again.
Note: Ensure that the prompt displays the current range of valid numbers.