Sheet1 // Time Spent: 6 hours import java.awt.* import java.awt.Color /**
Assignment A5 */ public class A5 extends Turtle { private double radius, vx, vy /**
Constructor: a black turtle starting at the middle of the panel with angle 0
(looking east). East (right) is angle 0 South (down). 270. The pen is down.*/
public A5() { super() } /** Constructor: a new turtle that has a ball drawn at the
turtle's position. The turtle is initially at (x, y), the pen is color c, the
ball's radius is r, and the ball moves with speed (vx, vy). */ public A5(double x,
double y, double r, Color c, double vX, double vY){ super(x, y, 0) setColor(c)
radius= r vx= vX vy= vY fillCircle(r) } /** Constructor: a new turtle that has a
ball drawn at the turtle's position. The turtle is initially at the center of the
panel, the pen is black, the ball's radius is r, and the ball moves with speed (vx,
vy). */ public A5(double vX, double vY, double r){ super() radius= r vx= vX vy= vY
fillCircle(r) } /** Place the turtle in the center of the panel, facing east, and
clear the window (make it white). */ public void placeInCenter()
{ jumpTo(getWidth()/2, getHeight()/2, 0) clear() Page 1