# Thread: build a house with windows and a door

1. Member
Join Date
Jan 2010
Posts
6
Rep Power
0

## build a house with windows and a door

***where am I going wrong; posting the directions after this thread***
****I'm very new to this******

import Guzdial.*;
import java.awt.*;
import java.applet.*;

/**
* Course: 2301
* Section: 2
* Professor: Shaw
* Name: Gerald Hart
* Assignment #: homework 1
*/
public class house
{

//It builds a house

static void house(int rectangle);

{
star(50);
turtle.penUp();
turtle.forward(100);
turtle.turn(72);
turtle.penDown();
}

static void rectangle(int width, int height); //Draws a rectangle of 200 x 100);
{
turtle.forward(height);
turtle.turnRight();
turtle.forward(width);
turtle.turnRight();
turtle.forward(height);
turtle.turnRight();
turtle.forward(width);
turtle.turnRight();
}

static void equiliateral(int length);
{
turtle.forward(100);
turtle.turn(120);
turtle.forward (100);
turtle.turn(120);
turtle.forward(100);
}

}

2. Member
Join Date
Jan 2010
Posts
6
Rep Power
0

## here's the directions

Create a Java class file (source file) using BlueJ named House.java. The 3 methods are:
1. house()
2. rectangle()
3. equilateral()
The rectangle() and equilateral() method will work as they did for the versions you did in the Lab. The house() method will draw a house, and it must call the rectangle() and equilateral() methods while it is doing so. The house drawn must have a triangular roof, a rectangular base, and a door and two windows. although in your house() method you will need to determine precisely where you want the turtle to go before it draws the equilateral triangle that will serve as the roof of the house, and before it draws the rectangles which will serve as the base of the house, the door and the two windows. Be sure your program compiles and runs without error.

3. Where do any methods or constructors of your House class call either the rectangle method or the equilateral method?

4. My recommendations are that

1) you only add a small amount of code to your program at a time, compile frequently, and fix any compilation errors that occur before you add new code.

2) that you try to incorporate the two methods, equilateral and rectangle, into your House class code, and then post any errors or problems you're having after trying this. Also be sure to use code tags and to give us the lines that are causing the errors.

Much luck!

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•