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), 22.06.2019 07:30
Why is terrorism a law enforcement concern? how is terrorism a violation of criminal law? what can the criminal justice system do to better prepare for future terrorist incidents?
Answers: 1
question
Advanced Placement (AP), 24.06.2019 22:30
Which of the following is not true about hydroelectricity a. use of gravitational force of flowing water b. its the most widely used renewable energy c. it has a high output of co2 that fossil fuels d. it has no direct waste asap
Answers: 1
question
Advanced Placement (AP), 25.06.2019 14:30
What drifted apart millions of years ago to create two different worlds
Answers: 1
question
Advanced Placement (AP), 28.06.2019 07:30
An aptitude test measures all of the following except a. numerical ability b. abstract reasoning skills c. prior subject knowledge d. perceptual accuracy
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
question
English, 29.08.2020 20:01
Questions on the website: 13722361