java.lang.Object | +----Worm_and_Apple
------------------------------------------------------------------ --| Displays distances between a worm and an apple. The worm keeps reducing --| the distance by its body length until it is close enough to bite the apple. --| Author: Michael B. Feldman, The George Washington University --| Last Modified: July 1995 ------------------------------------------------------------------Before the program runs, it asks the user to input the starting X and Y (pixel) coordinates of the Spider named "apple". The input prompt and response is displayed in a "System window" (which under Windows 95 looks like an MS-DOS window). Before responding to the prompt the user should move the System window to not overlap the drawing area (Room). If this is not done, hidden areas of Room will appear blank when Room is exposed later, because this program does not repaint the drawing area in response to window events.
Click on the "close button" (marked X) in the top right corner of the spider's window, to terminate the application.
public Worm_and_Apple()
public static void main(String args[]) throws IOException