Question: Use Eclipse Java Write a program to mirror a childrens board game named Chutes and Ladders . You will need a separate class for each

Use Eclipse Java

Write a program to mirror a childrens board game named Chutes and Ladders.

You will need a separate class for each object (Die, Player), as well as a separate game program (main method). To be clear, you will submit a total of three classes.

Die
-value: int
+getValue(): int +roll(): int
Player
-name:String -currentSquareNumber:int
+getCurrentSquareNumber():int +updateCurrentSquareNumber(int n):void +getName(): String +setName(String n):void

Game Algorithm:

1) Create a Die object, and 2 Player objects. 2) Ask for and store the names of the two players. 3) Loop until a player wins (Winning = a players current square number is equal to or greater than 100). a) Roll, then update the first players current square number. b) Roll, then update the second players current square number. c) Check if either player has won.

Please have appropriate prompts and game information.

Remember, this is Chutes and Ladders, so if the current square number is divisible by 10 then ladder up an additional dice roll; if the current square number is divisible by 11 then chute down an additional dice roll.

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!