Question: Java: Project description Based on how the real game is played we have the following physical objects to model: Two players Scorecard Dice The game
Java:
Project description
Based on how the real game is played we have the following physical objects to model:
Two players
Scorecard
Dice
The game
The relationship between the objects is as follows:
Yahtzee hasA game, which hasTwo players
Scorecard
Name
Five dice
Thirteen rounds



The following test case needs to pass:

Yahtzee class1. Update the main method to do the following a. Instantiate an instance of class Game AiPlayer class1. Update method rollDice to do the following Add the parameter of class Roll that was added in interface JuaX Referencing the parameter of class Roll, get the collection of class Die by calling the getter Loop through the collection of class Die, for each instance call method rolDie in class Die to obtain a face value a. b. c. Die class1. Add method rolDie to do the following a. Access level modifier public b. Return type void c. Empty parameter list d. Instantiate an instance of class Random e. Set member variable tarevalu equal to method call pextlnt in class Random on the instance of class random, passing as an argument the maximum sided die then shift the result by adding one to it face value of a six Game class 1. Add a constructor to do the following a. Access level modifier public b. Empty parameter list c. Call method createPlayers d. Call method displayPlaxers e. Call method playGame 2. Add method createPlavers to do the following Access level modifier private a. b. c. Return type void Empty parameter list Instantiate the member variable of class ArayList representing the collection of class Player Instantiate an instance of class Scanner so d. e. it takes input from the console Prompt the user from the console to enter their name and store the value in an instance of class String Instantiate an instance of class f. g. h. Call method setName in class Player for the instance of class assing as an argument the data read from the console i. Instantiate and instance of class AiPlayer j. Call method setName in class Player for the instance of class APlaer passing as an argument a string the AI player's name Yahtzee class1. Update the main method to do the following a. Instantiate an instance of class Game AiPlayer class1. Update method rollDice to do the following Add the parameter of class Roll that was added in interface JuaX Referencing the parameter of class Roll, get the collection of class Die by calling the getter Loop through the collection of class Die, for each instance call method rolDie in class Die to obtain a face value a. b. c. Die class1. Add method rolDie to do the following a. Access level modifier public b. Return type void c. Empty parameter list d. Instantiate an instance of class Random e. Set member variable tarevalu equal to method call pextlnt in class Random on the instance of class random, passing as an argument the maximum sided die then shift the result by adding one to it face value of a six Game class 1. Add a constructor to do the following a. Access level modifier public b. Empty parameter list c. Call method createPlayers d. Call method displayPlaxers e. Call method playGame 2. Add method createPlavers to do the following Access level modifier private a. b. c. Return type void Empty parameter list Instantiate the member variable of class ArayList representing the collection of class Player Instantiate an instance of class Scanner so d. e. it takes input from the console Prompt the user from the console to enter their name and store the value in an instance of class String Instantiate an instance of class f. g. h. Call method setName in class Player for the instance of class assing as an argument the data read from the console i. Instantiate and instance of class AiPlayer j. Call method setName in class Player for the instance of class APlaer passing as an argument a string the AI player's name
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
