Question: Define a method getWinOrLose ( . . . ) , which given the values on two dice, will return true if you win the game
Define a method getWinOrLose which given the values on two dice, will return true if you win the game and false if you lose.
You LOSE if the sum of both dice is or ; otherwise, you win. The value of a die can be through
inside your main method, you should
define a Scanner to get the two dice values from user input,
invoke the getWinOrLose method; based on the invokation result, print out the message: You win or You lose
The method header is partially provided below:qquad getWinOrLose
Hint you would need to replace s with the appropriate java code as well.
PLEASE SOLVE IN 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
