Package com.zybooks.dsaj.recursion
Class Ruler
java.lang.Object
com.zybooks.dsaj.recursion.Ruler
Provides support for drawing an English ruler.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
Ruler
public Ruler()
-
-
Method Details
-
drawRuler
public static void drawRuler(int nInches, int majorLength) Draws an English ruler. The level of division depends upon the designated length of the major tick. For example, a major tick of length 3 will produce a ruler with ticks (of length 2) at the half-inch mark and ticks (of length 1) at the quarter-inch marks.- Parameters:
nInches
- the total number of inches to be drawnmajorLength
- the number of dashes used at complete inch marks
-
main
Draws sample rulers with various parameters.
-