Question: Create a lottery game application. Generate three random numbers ( see Appendix D for help in doing so ) , each between 0 and 9
Create a lottery game application. Generate three random numbers see Appendix D for help in doing so each between and Allow the user to guess three numbers. Compare each of the users guesses to the three random numbers and display a message that includes the users guess, the randomly determined threedigit number, and the amount of money the user has won, as follows:
No matching numbers; award is $
Any one matching number; award is $
Two matching numbers; award is $
Three matching numbers, not in order; award is $
Three matching numbers in exact order; award is $
Make certain that your application accommodates repeating digits. For example, if a user guesses and and the randomly generated digits are and do not give the user credit for three correct guessesjust one. Save the file as Lottery.java.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
