Turtlegraphics with Java
HomeAufgabenDruckenJava-Online

Serie 7: Methods


1)
Create the following drawing by first creating a method triangle. The cloverleaf() method consists of four triangles. With the help of the method setPos(x, y) you can draw cloverleaves at different positions. For fun, you can also fill the figures.

 
       

2) Draw a European flag by first writing a star() method that draws a star. The blue background colour is obtained using the clear(Color.blue) method.

 

 

 

3) First write a method arc(), then a method fish(), which consists of two arc(). Then you can draw a row or a whole school of fish.

 
   

 

 

 

 

4)

 

 


Use methods with parameters to draw shamrocks in different sizes and colours.