Write a method for Turtle to draw a rectangle. Pass in the width and height for the rectangle.

What will be an ideal response?

```
public void drawRectangle ( int width , int height )
{
this . turnRight ( ) ;
this . forward ( width ) ;
this . turnRight ( ) ;
this . forward ( he i ght ) ;
this . turnRight ( ) ;
this . forward ( width ) ;
this . turnRight ( ) ;
this . forward ( he i ght ) ;
}
```

Computer Science & Information Technology

You might also like to view...

A data structure in which only the top element can be accessed is called a(n) _______ .

a. stack b. linear array c. sorted array d. random array e. none of the above

Computer Science & Information Technology

As with tasks, you can change the view of your notes.

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

Computer Science & Information Technology