Turtlegraphics for Smartphones and Tablets

Bern University of Teacher Education  
HomeStart Online EditorPrintAndroid GamesJava-Online

Serie 6: methods

As a draft you may use the following example: Edit example with online-compiler

1) Create the following drawing by initially writing a method arc() (see draft) that draws an arc. A second method pental() draws a leaf. In the main program a flower will be drawn.

 

 

2) Create the following drawing by initially writing a method triangle() that draws a triangle. A second method cloverleaf() uses four triangles. With the aid of setPos(x, y) the cloverleaf() can be drawn in different positions.

 

3) Draw a starry sky and a Europe flag. As a draft you can use the following example:

Edit S6a3 with online-compiler