Java’s class Graphics has the following method to draw a line between two given points:
Graphics uses a coordinate system that measures points from the top left corner of a window. Write a recursive method that draws a picture of a 12-inch ruler. Mark inches, half inches, quarter inches, and eighth inches. Mark the half inches with marks that are smaller than those that mark the inches. Mark the quarter inches with marks that are smaller than those that mark the half inches, and so on. Your picture need not be full size. Hint: Draw a mark in the middle of the ruler and then draw rulers to the left and right of this mark.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here