Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in JAVA please In this lab, you are going to create a code to play a game, called PICK THREE. Game is defined as follows:

image text in transcribed
in JAVA please
In this lab, you are going to create a code to play a game, called PICK THREE. Game is defined as follows: Computer generates three random digits between 0 and 9. These are called lottery number. User will try to guess this lottery numbers. User does not know these three random numbers so he/she has some chance to match the numbers. Once the user enters his/her numbers and his/her full-name, then computer will display the following information Lottery numbers: firstNumber secondNumber thirdNumber User guesses firstGuess secondGuess thirdGuess Message to user User wins according to the following rules: 1) If user input matches the lottery number in exact order, the award is $10,000. 2) If user input matches the lottery numbers in pairs in given order, like first and second, or second and third, or first and last, then user wins $3,000. 3) If one of the numbers in the user input matches a number in the lottery number, the award is $1000. 4) User will receive highest possible award for his/her play Here are some examples of outputs: Example: .......Welcome to PICK THREE game....... Enter your first guess between 0-9: Enter your second guess between 0-9: Enter your third guess between 0-9: Enter your full-name: Mustafa Atici 0 2 9 Lottery Numbers are Mustafa Atici's guess : 02 9 : 0 2 9 Congratulations Mustafa Atici, you have won $10,000

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

b. Where did they come from?

Answered: 1 week ago