Now use your house to draw a town with dozens of houses at di®erent sizes. You'll probably want to modify your house method to draw at an input coordinate, then change the coordinate where each house is drawn.

What will be an ideal response?


```
public void drawTown ( )
{
for ( int y = 100; y < 300; y = y + 100)
{
// loop drawing 6 houses
for ( int x = 0 ; x < 600; x = x + 100)
{
drawHouse (x , y , 1 0 0 , 5 0 ) ;
}
}
for ( int y = 300; y < 500; y = y + 100)
{
// loop drawing 6 houses
for ( int x = 0 ; x < 600; x = x + 50)
{
drawHouse (x , y , 5 0 , 5 0 ) ;
}
}
}
```

Computer Science & Information Technology

You might also like to view...

Which statement copies a string from a text box named txtLastName, converts the string to lowercase and saves the string in strLastName?

a. strLastName = txtLastName b. txtLastName.Text = strLastName(ToLower) c. strLastName = ToLower(txtLastName.Text) d. strLastName = txtLastName.Text.ToLower()

Computer Science & Information Technology

Small digital cameras are built into many computers, and they are mostly used for _____.

A. video conferencing B. taking pictures C. taking videos D. security purposes

Computer Science & Information Technology

How would you implement the equivalent of a remote procedure call using a tuple space? What are the advantages and disadvantages of implementing a remote procedure call–style interaction in this way?

What will be an ideal response?

Computer Science & Information Technology

The Increase Decimal button automatically adds dollar signs and two decimal places to your data.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology