ACS-1903 Chapter 7: Circle
Document Summary
Diameter = 30; xposition = 20; yposition = 60; color = "blue"; isvisible = false; import java. awt. import java. awt. geom. * a circle that can be manipulated and that draws itself on a canvas. * @version 1. 0 public class circle private int diameter; private int xposition; private int yposition; private string color; private boolean isvisible; * create a new circle at default position with default color. public circle() nothing. public void makeinvisible() * move the circle a few pixels to the right. public void moveright() If it was already visible, do nothing. public void makevisible() If it was already invisible, do movehorizontal(20); isvisible = true; draw(); erase(); isvisible = false; movevertical(20); movevertical(-20); movehorizontal(-20); * move the circle a few pixels to the left. public void moveleft() * move the circle a few pixels up. public void moveup() * move the circle a few pixels down. public void movedown() * move the circle horizontally by "distance" pixels. public void movehorizontal(int distance)