import java.awt.*; /** * A simple class to draw a picture of a house * * @author Ben Dugan * @author Hal Perkins * @version 6/25/01 */ public class House { /** Create a new window and draw a picture of a house in it */ public void drawHouse( ) { // Make a new Graphics window GWindow theWindow = new GWindow(); // Make the basic frame of the house theWindow.add(new Rectangle(50, 200, 150, 100)); theWindow.add(new Triangle(30, 180, 230, 180, 125, 150, Color.red, true)); // Draw a single window, by drawing 4 panes theWindow.add(new Rectangle(60, 220, 15, 30)); theWindow.add(new Rectangle(75, 220, 15, 30)); theWindow.add(new Rectangle(60, 250, 15, 30)); theWindow.add(new Rectangle(75, 250, 15, 30)); } }