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

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!