See: Description
Package | Description |
---|---|
org.gannacademy.cdf.turtlelogo |
Turtle logo is an introduction to computer programming.
|
Turtle logo is an introduction to computer programming. We imagine that we are working with a turtle that is holding a pen — presumably in its mouth. As the turtle roams around its terrarium, it drags the pen, leaving tracks wherever it goes.
A simple example of a program to control a turtle might look something like this:
import org.gannacademy.cdf.turtlelogo.*; public class DrawASquare{ public static void main(String[] args) { Turtle cecil = new Turtle(); // instantiate a new turtle // give the turtle some instructions cecil.fd(100); cecil.lt(90); cecil.fd(100); cecil.lt(90); cecil.fd(100); cecil.lt(90); cecil.fd(100); } }
The output of this program would be:
A turtle logo framework for Java AWT/Swing graphics
Copyright © 2018 Seth Battis
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
Copyright © 2018. All rights reserved.