<?xml version="1.0" encoding="UTF-8"?>
<class name="KnopfTest2" extends="Knopf" extends-java="Knopf" enable="true" strideversion="1">
    <javadoc xml:space="preserve">Die Uebungen (mit Loesungen) zu diesem Szenario finden Sie hier:
http://www.informatikzentrale.de/uebungen-foreach-schleife-greenfoot-3.html</javadoc>
    <imports>
        <import target="java.util.*" enable="true"/>
        <import target="greenfoot.*" enable="true"/>
    </imports>
    <implements/>
    <fields>
        <variable access="private" type="Ameise" type-java="Ameise" name="a1" value="new Ameise(&quot;Willi&quot;)" value-java=" new Ameise(&quot;Willi&quot;)" enable="true"/>
        <variable access="private" type="Ameise" type-java="Ameise" name="a2" value="new Ameise(&quot;Heini&quot;)" value-java=" new Ameise(&quot;Heini&quot;)" enable="true"/>
        <variable access="private" type="Ameise" type-java="Ameise" name="a3" value="new Ameise(&quot;Rocki&quot;)" value-java=" new Ameise(&quot;Rocki&quot;)" enable="true"/>
        <variable access="private" type="Ameise" type-java="Ameise" name="a4" value="new Ameise(&quot;Alfi&quot;)" value-java=" new Ameise(&quot;Alfi&quot;)" enable="true"/>
        <variable access="private" type="Ameise[]" type-java="Ameise[]" name="ameisenliste" value="{a1,a2,a3,a4}" value-java="{a1, a2, a3, a4}" enable="true"/>
    </fields>
    <constructors/>
    <methods>
        <method access="public" type="void" type-java="void" name="aktionAusfuehren" enable="true">
            <javadoc xml:space="preserve"/>
            <params/>
            <throws/>
            <body>
                <comment xml:space="preserve">Geben Sie die Namen aller Ameisen auf der Konsole aus</comment>
                <comment xml:space="preserve">Geben Sie die Namen aller Ameisen mit der Schaltpult-Methode textAusgeben auf dem Bildschirm aus (welt.textAusgeben ...)</comment>
                <foreach type="Ameise" type-java="Ameise" var="eineAmeise" collection="this.ameisenliste" collection-java="this.ameisenliste" enable="true">
                    <call expression="welt.textAusgeben(eineAmeise.getName())" expression-java="welt.textAusgeben(eineAmeise.getName())" enable="true"/>
                </foreach>
            </body>
        </method>
    </methods>
</class>
