it’s java programming?

https://www.txlottery.org/export/sites/lottery/Games/Pick_3/

Write a Java Program to Play your version of the Texas Pick 3 Lottery. You will need to include the provided code given below in your program.

We will use 1 number as 000-999 instead of 3 separate values.

  1. In the main() method, declare an int named myPick3choice.
  2. Create a prompt for myPick3 as “Enter your Pick 3 choice:0-999”.
  3. Create a method named playPick3 that has an int parameter named myPick3.
  4. In the playPick3 method, do the following:
    1. Create an int variable called playCounter and initialize it to 0.
    2. Create an int variable called myPick3Result.
      1. If myPick3Result matches the variable myPick3, then display the result of playcounter as “PlayCounter = ….” and exit the loop.
      2. If myPick3Resultdoes not match, increment the variable playCounter and continue the loop.
    3. Create a loop that calls the method officialPlayPick3 (Provided below) and store the result in myPick3Result.

5 points Extra Credit.

Create a loop in the main method to allow you to play as often as you wish.

Enter your Pick 3 choice 0-999: 554

PlayCounter = 1343 ( This result will vary )

Include the code below in your program. The code also requires the following import line:

import java.util.concurrent.ThreadLocalRandom;

/**
* officialPlayPick3()
* Returns a random number 0-999
* @return int
*/

public static int officialPlayPick3() {

final int min = 0;
final int max = 999;
return ThreadLocalRandom.current().nextInt(min, max + 1);

}

 

"Is this question part of your assignment? We Can Help!"