4.8.4 Lösungen
 
Aufgabe 1
Download:
Muster2.java

Die innere Schleife zeichnet ein kleines Quadrat. Die äußere Schleife sorgt dafür, dass eine Zeile dieser Vierecke gezeichnet werden.


 

Aufgabe 2
Download:
Kreise.java
    public void zeichne() {

        for (int i = 10; i <= 100; i += 10){

          t1.jumpTo(i, 0);

          t1.circle(i);

        }



    }


 

Aufgabe 3
Download:
Muster3.java
    public void zeichne() {

        t1.right(90);

        double x=-200;

        double y=200;

        t1.jumpTo(x,y);

        while(y>-200){

          while(x<200){

            for (int i=0; i < 4; i++){

              t1.forward(15);

              t1.right(90);

            }

            x+=20;

            t1.jumpTo(x,y);

          }

          x=-200;

          y-=20;

          t1.jumpTo(x,y);

        }

    }
zu 4.9 Weitere Übungen
zur Startseite www.pohlig.de  (C) MPohlig 2004