Java Reference
In-Depth Information
Ten lords a-leaping,
Nine ladies dancing,
Eight maids a-milking,
Seven swans a-swimming,
Six geese a-laying,
Five golden rings,
Four calling birds,
Three French hens,
Two turtle doves, and
A partridge in a pear tree.
PP 6.11 Design and implement a program that draws 20 horizontal,
evenly spaced parallel lines of random length.
PP 6.12 Design and implement a program that draws the side view of
stair steps from the lower left to the upper right.
PP 6.13 Design and implement a program that draws 100 circles of ran-
dom color and random diameter in random locations. Ensure
that in each case the entire circle appears in the visible area of
the applet.
PP 6.14 Design and implement a program that draws 10 concentric cir-
cles of random radius.
PP 6.15 Design and implement a program that draws a brick wall pattern
in which each row of bricks is offset from the row above and
below it.
PP 6.16 Design and implement a program that draws a quilt in which a
simple pattern is repeated in a grid of squares.
PP 6.17 Modify the previous problem such that it draws a quilt using a
separate class called Pattern that represents a particular pat-
tern. Allow the constructor of the Pattern class to vary some
characteristics of the pattern, such as its color scheme. Instantiate
two separate Pattern objects and incorporate them in a checker-
board layout in the quilt.
PP 6.18 Design and implement a program that draws a simple fence with
vertical, equally spaced slats backed by two horizontal support
boards. Behind the fence show a simple house in the background.
Make sure the house is visible between the slats in the fence.
PP 6.19 Design and implement a program that draws a rainbow. Use
tightly spaced concentric arcs to draw each part of the rainbow
in a particular color.
Search WWH ::




Custom Search