Eine gute Antwort wäre:

All you have to do is copy the information to the blanks.

Applet with all the Rectangles

Here is the applet with all the blanks filled in. With skillful use of the text editor, much of this filling in is fairly easily done using "copy" and "paste."

import java.applet.Applet;
import java.awt.*;

// assume that the drawing area is 350 by 250
public class HouseRectangles extends Applet
{
  final int width  = 350, height = 250;
  final int houseX =  65, houseY = 100, houseW = 110, houseH = 110 ;
  final int doorX  = 120, doorY  = 165, doorW  =  25, doorH  =  40 ;
  final int lWindX =  90, lWindY = 115, lWindW =  30, lWindH =  30 ;
  final int rWindX = 130, rWindY = 115, rWindW =  30, rWindH =  30 ;
  final int trunkX = 255, trunkY = 100, trunkW =  10, trunkH = 100 ;

  public void paint ( Graphics gr )
  {
     gr.setColor( Color.orange );    // there is no Color brown
     gr.drawRect( houseX , houseY , houseW, houseH); // house
     gr.drawRect( doorX  , doorY  , doorW , doorH ); // door
     gr.drawRect( lWindX , lWindY , lWindW, lWindH); // lwind
     gr.drawRect( rWindX , rWindY , rWindW, rWindH); // rwind
     gr.fillRect( trunkX , trunkY , trunkW, trunkH); // trunk
  }
}

Here is the beautiful picture that it produces:

If you see this, your browser is not running Java.

The tree trunk is a solid rectangle because the method fillRect() was used. This method is just like drawRect() except that it fills in the figure with the current color. The door is not really where we want it. We could go back to the graph paper and be more careful this time, or use the easy method.

FRAGE 5:

You want the door horizontally centered.

Inhaltsverzeichnis