Answered step by step
Verified Expert Solution
Question
1 Approved Answer
import java.util. * ; import java.awt. * ; public class DancingTurtles { public static void main ( String [ ] args ) { World world
import java.util.;
import java.awt.;
public class DancingTurtles
public static void mainString args
World world new World;
Turtle yertle new Turtleworld;
This is a loop that runs times you will learn to write loops in Unit
forint i; i ; i
Can you choose a randomX between
Can you adjust for the pixel width of the turtle,
so it doesn't get cut off at the edges?
Move the range from to
int randomX
Can you choose a randomY between
Can you adjust for the pixel height of the turtle,
so it doesn't get cut off at the edges?
int randomY
yertle.moveTorandomX randomY;
yertle.turnRight;
Can you choose a random red, green, and blue value between
int randomR
int randomG
int randomB
yertle.setColornew ColorrandomR randomG, randomB;
end of loop
world.showtrue;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started