Write a method for Turtle to draw a hexagon. Pass in the length of the sides.
What will be an ideal response?
public void drawHexagon ( int width )
{
this . turn ( 3 0 ) ;
this . forward ( width ) ;
this . turn ( 6 0 ) ;
this . forward ( width ) ;
this . turn ( 6 0 ) ;
this . forward ( width ) ;
this . turn ( 6 0 ) ;
this . forward ( width ) ;
this . turn ( 6 0 ) ;
this . forward ( width ) ;
this . turn ( 6 0 ) ;
this . forward ( width ) ;
this . turn ( 6 0 ) ;
}
Computer Science & Information Technology
You might also like to view...
A(n) ________ is typically used to display records from both tables, regardless of whether there are matching records
Fill in the blank(s) with correct word
Computer Science & Information Technology
The ________ function is used to check whether a field contains no value
A) IsNumeric B) IIf C) IsNull D) Concat
Computer Science & Information Technology