Question: Given the values on two dice, return true if you win the game and false if you lose. You lose if the sum of the
| Given the values on two dice, return true if you win the game and false if you lose. You lose if the sum of the values on both dice is 2 or 6. The value of a die can be 1 through 6. getWinOrLose(1, 1) ? false getWinOrLose(2, 4) ? false getWinOrLose(6, 6) ? true
starts ''public boolean getWinOrLose(int first, int second) { }''
|
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
