Problem

Java’s class Graphics has the following method to draw a line between two given points:/**...

Java’s class Graphics has the following method to draw a line between two given points:

/** Draws a line between the points (x1, y1) and (x2, y2).*/public void drawLine(int x1, int y1, int x2, int y2)

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.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 7
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT