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

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

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

Post 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
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply