subject

(a) You will write method getPlayer2Move, which returns the number of coins that player 2 will spend in a given round of the game. In the first round of the game, the parameter round has the value 1, in the second round of the game, it has the value 2, and so on. The method returns 1, 2, or 3 based on the following rules. If round is divisible by 3, then return 3.
If round is not divisible by 3 but is divisible by 2, then return 2.
If round is not divisible by 3 and is not divisible by 2, then return 1.
Complete method getPlayer2Move below by assigning the correct value to result to be returned.

/** Returns the number of coins (1, 2, or 3) that player 2 will spend, as described in part (a).

*/

public int getPlayer2Move(int round)

{

int result;

return result;

}

ansver
Answers: 2

Another question on Advanced Placement (AP)

question
Advanced Placement (AP), 21.06.2019 23:00
What effect does the speaker's use of personification have on the theme of the poem? cite evidence in your answer.
Answers: 2
question
Advanced Placement (AP), 22.06.2019 18:30
Me guys ! software enables between different types of software and between software and hardware. a. communication b. input c. output d. distribution
Answers: 1
question
Advanced Placement (AP), 24.06.2019 04:30
Anyone knows answer for code.org unit 3: intro to programming, lesson 7: apis and function parameters, bubble 11. !
Answers: 2
question
Advanced Placement (AP), 25.06.2019 02:00
Alife insurance salesman sells on the average 3 life insurance policies per week. use poisson's law to calculate the probability that in a given week he will sell 2 or more policies but less than 5 policies? i just require an answer.
Answers: 1
You know the right answer?
(a) You will write method getPlayer2Move, which returns the number of coins that player 2 will spend...
Questions
Questions on the website: 13722367