Question: I need this in Java Write a program that will play a game between you and the computer called number wars. The program randomly generates

 I need this in Java Write a program that will play

a game between you and the computer called number wars. The program

I need this in Java

Write a program that will play a game between you and the computer called number wars. The program randomly generates a number, 01, 2. The program prompts the user to enter a number 0, 1, 2 and displays a message indicating whether the user or the computer wins, loses, or draws. Example: Welcome to Number Wars. Rules: You choose a number, and the computer chooses a number and we see who wins! O loses to 1 1 loses to 2 2 loses to o Please choose your Number: 0, 1, 2 0 you chose Zero Computer chooses One Computer wins! LOGIC: Display message for user(or maybe the rules and win conditions) Display Numbers --User chooses a number-- --computer chooses a random number, 0, 1, 2. (int)(Math.random() * 10)%3; or (int) (Math.random()*3) Print what you chose Print what the computer chose if statements>> check to see who has won.You will have to have several if statements that check to see what you have and compare it to what the computer chose. Based on what was chosen, print out who wins, or that it was a tie. Zero vs Zero = Tie Zero vs One = One wins Zero vs Two = Zero wins One vs One = Tie One vs Two = Two wins One vs Zero = One wins Two vs Two = Tie Two vs One = Two wins Two vs Zero = Zero Wins. Some of these are redundant and you might not need this many if statements depending on how you write it. Bonus: (5 Points) Give the player a choice to play the computer or another player

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!