go to previous page   go to home page   go to next page

Answer:


Foliage

Define these values as constants:

final int treeX = 200, treeY = 10, 
treeW = 125, treeH = 55;  // tree leaves

Add foliage to the tree:

gr.setColor( Color.green );
gr.drawOval( treeX, treeY, treeW, treeH );

Five green lines make up the rolling hills in the background. Estimate an (X, Y) value for each line's endpoints. If a value already has a name, like houseX, or can be calculated, do that.

house and a tree

QUESTION 7:

The first line is the one on the left. Fill in the blanks in the following. (It might be a bit tedious to fill them all in, but try at least a few.)

Try to use values that are already in variables, when you can. For example, line 2 ends at the x value in houseX.

 startX startY endX endY
line 1L1X1: L1Y1:L1X2:L1Y2:
line 2L2X1: L2Y1:L2X2:L2Y2:
line 3L3X1: L3Y1:L3X2:L3Y2:
line 4L4X1: L4Y1:L4X2:L4Y2:
line 5L5X1: L5Y1:L5X2:L5Y2: