Question: JAVA// You need to code the FirstToOne game. The game is meant for two to five Player objects (should be kept in an array of

JAVA//

You need to code the FirstToOne game. The game is meant for two to five Player objects (should be kept in an array of Player), each starting with 50 points. You will be using a die. Ask the user for the number of players, the names of the players, and the number of sides on the die. Each player takes a turn rolling the die (use a random number generator to get the value). The value is subtracted from the players points. The first player to exactly one point wins! If a players remaining points minus the roll is less than one, the value is added instead of subtracted. Make certain to consider ties.

NOTE:

MUST MATCH THE UMLS

 JAVA// You need to code the FirstToOne game. The game is
MUZT MATCH SAMPLE OUTPUT BELOW

If a tie, it needs to list it.:

meant for two to five Player objects (should be kept in an
array of Player), each starting with 50 points. You will be using

SAMPLE OUTPUT: How many faces on the die? 8 How many players? 3 Name of player \#1 Mike Name of player \#2 Joe Name of player \#3 Sam Turn \#1 - Mike: 50 point(s) Roll: 7 SUBTRACTING.... New points: 43 Joe: 50 point(s) Roll: 7 SUBTRACTING.... New points: 43 Sam: 50 point(s) Roll: 3 SUBTRACTING.... New points: 47 Turn \#2 - Mike: 43 point(s) Roll: 5 SUBTRACTING.... New points: 38 Joe: 43 point(s) Roll: 6 SUBTRACTING.... New points: 37 Sam: 47 point(s) Roll: 5 SUBTRACTING.... New points: 42 Turn \#3 - Mike: 38 point(s) Roll: 1 SUBTRACTING.... New points: 37 Joe: 37 point(s) Roll: 1 SUBTRACTING.... New points: 36 Sam: 42 point(s) Roll: 3 SUBTRACTING.... New points: 39 Turn \#4 - Mike: 37 point(s) Roll: 6 SUBTRACTING.... New points: 31 Joe: 36 point(s) Roll: 8 SUBTRACTING.... New points: 28 Sam: 39 point(s) Roll: 3 SUBTRACTING.... New points: 36 Turn \#5 - Mike: 31 point(s) Roll: 3 SUBTRACTING.... New points: 28 Joe: 28 point(s) Roll: 7 SUBTRACTING.... New points: 21 Sam: 36 point(s) Roll: 1 SUBTRACTING.... New points: 35 Turn \#6 - Mike: 28 point(s) Roll: 8 SUBTRACTING.... New points: 20 Joe: 21 point(s) Roll: 2 SUBTRACTING.... New points: 19 Sam: 35 point(s) Roll: 1 SUBTRACTING.... New points: 34 Turn \#7 - Mike: 20 point(s) Roll: 6 SUBTRACTING.... New points: 14 Joe: 19 point(s) Roll: 1 SUBTRACTING.... New points: 18 Sam: 34 point(s) Roll: 3 SUBTRACTING.... New points: 31 Turn \#8- Mike: 14 point(s) Roll: 7 SUBTRACTING.... New points: 7 Joe: 18 point(s) Roll: 3 SUBTRACTING.... New points: 15 Sam: 31 point(s) Roll: 1 SUBTRACTING ... New points: 30 Turn \#9 - Mike: 7 point(s) Roll: 7 ADDING ........ New points: 14 Joe: 15 point(s) Roll: 4 SUBTRACTING... New points: 11 Sam: 30 point(s) Roll: 8 SUBTRACTING.... New points: 22 Turn \#10 - Mike: 14 point(s) Roll: 7 SUBTRACTING.... New points: 7 Joe: 11 point(s) Roll: 8 SUBTRACTING.... New points: 3 Sam: 22 point(s) Roll: 4 SUBTRACTING.... New points: 18 Turn \#11 - Mike: 7 point(s) Roll: 4 SUBTRACTING... New points: 3 Joe: 3 point(s) Roll: 4 ADDING....... New points: 7 Sam: 18 point(s) Roll: 2 SUBTRACTING.... New points: 16 Turn \#12 - Mike: 3 point(s) Roll: 6 ADDING....... New points: 9 Joe: 7 point(s) Roll: 8 ADDING....... New points: 15 Sam: 16 point(s) Roll: 8 SUBTRACTING... New points: 8 Turn \#13 - Mike: 9 point(s) Roll: 6 SUBTRACTING.... New points: 3 Joe: 15 point(s) Roll: 8 SUBTRACTING.... New points: 7 Sam: 8 point(s) Roll: 3 SUBTRACTING.... New points: 5 Turn \#14 - Mike: 3 point(s) Roll: 6 ADDING....... New points: 9 Joe: 7 point(s) Roll: 5 SUBTRACTING... New points: 2 Sam: 5 point(s) Roll: 6 ADDING........ New points: 11 Turn \#15 - Mike: 9 point(s) Roll: 8 SUBTRACTING.... New points: 1 Joe: 2 point(s) Roll: 2 ADDING....... New points: 4 Sam: 11 point(s) Roll: 7 SUBTRACTING.... New points: 4 The game was won by Mike NOTE: It a be, it needs to list it. Example: Turn \#16 - Diane: 6 point(s) Roll: 5 SUBTRACTING. New points: 1 Joe: 11 point(s) Roll: 3 SUBTRACTING. New points: 8 Miko: 4 point(s) RoE: 3 SUBTRACTING. New points: 1 The game was won by Diane and Make

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!