Page 1 of 1

Write the solution to this issue in Java Turtle and rabbit (Analogy) both competitors will start the race from the first

Posted: Thu Jun 02, 2022 8:09 am
by answerhappygod
Write the solution to this issue in Java
Turtle and rabbit (Analogy) both competitors will start the race from the first square of the 20-square track. Each square refers to the places where the contestants can be found throughout the race. 20. Whoever gets to the square first or passes it will win the race. Since the race will be on slippery ground, competitors may slip from time to time. By generating a random number once for each move, it will be determined which move the contestants will make.The following figure shows which movement the contestants performed with what percentage probability. If one of the contestants slides back from square 1 (the first square), take him back to square 1. (do not use negative-valued squares.)For example, the number i generated for the turtle will perform a “fast walking” movement if 1<=i<=5(50% probability), a “sliding” movement if 6<=i<=7, and a Slow walking movement if 8<=i<=10. Every second, the location of the rabbit and turtle on the 20-piece path should be indicated by the letters R and T. If two of them fall into the same square, it will write OUCH.If the turtle wins at the end of the race, the message “Turtle won oley” should be written on the screen. If rabbit wins “rabbit wins, yuh!" it should be written. If they are together, “Together” it should be written.It is desirable that the turtle and the rabbit be encoded with object-oriented logic. (You just need to use the class structure without using inheritance. )
At the end you will create a Word file
A Word file should summarize the work done in the assignment. In the summary, it should be specified what the data contained in the data file is, what analyzes are performed using which functions, and what is printed . In the Word file, this information should be provided in articles and, respectively