Java

Homework 2a
Before attempting this project, be sure you have completed all of the reading assignments, hands-on
labs, discussions, and assignments to date.
(25 points) Write a Java program to simulate a pick 3, 4 or 5 lottery drawing. A lottery game of this type
will draw values between 0 and 9. You should use the Math.Random() or the java.util.Random() class to
generate the values in the lottery drawing. The program should prompt the user for which lottery game
they want to play. The program should also ask how many times they want to play the game. The output
should show the numbers picked for each game and the sum of the numbers of all games. Here is a
sample run:
Which lottery game do you want to play (Enter 3 for pick-3, 4 for pick-4 or 5 for pick-5? 3
How many games would you like to play? 10
The numbers selected were:
3 4 9
2 4 7
3 3 1
0 3 2
9 3 1
9 2 4
4 5 2
1 1 0
0 1 7
8 6 3
The sum for all numbers picked was: 107

Is this the question you were looking for? If so, place your order here to get started!