- Commanding a Turtle
- Adding New Commands
- Iteration & Animation
- Hierarchical Structure
- Procedure Inputs
- Primitive Operators
- Defining Operators
- Words & Sentences
- User Interface Events
- What If? (Predicates)
- Local Variables
- Global Variables
- Word/Sentence Iteration
- Mastermind Project
- Turtles As Actors
- File Input/Output
- A Java Program
- What's a Class?
- Extending Existing Classes
- Turtle Graphics
- Control Flow
- User Interface Events
Appendix A (Jargon)
- A -
The world is full of stuff with names that can be described in incredible detail. But when you see or hear the name of something, if you know what it is you immediately can imagine it - in some general form.
As an example, when you see or hear the word tree, you picture a trunk and branches. Trees come with bark in a variety of colors; they have leaves that come in all sorts of shapes and sizes, or maybe needles; they may have fruit; they can be short or tall; their wood can be classified as soft or hard, etc...
Your initial image was an abstraction of what a tree is. The details of individual trees didn't matter, at least not initially.
In computer programming, you will be building programs in pieces. You are going to give these pieces names that are descriptive of what they do. These names are abstractions and will be used as such.
For example, if you write a drawing program, you will probably write procedures which draw objects, e.g., drawHouse, drawTree, drawCloud, etc... With these procedures properly written, they can be used without thinking about how they do what they claim to do.
In summary, a good abstraction is descriptive enough for you to imagine what you are working with, but specifies only as much detail as is necessary.
In computer science, an algorithm is a ordered step-by-step description of how to do something. An algorithm can initially be described in a native language, graphically in the form of a plumbing diagram or flowchart, or even in pseudocode.
An applet is a Java program that is executed as part of a web page. Instead of executing it from a DOS or a Unix command window with the "java" command, you put an <APPLET ...> section in the HTML that makes up your webpage. As the browser interprets your HTML, it will find the <APPLET...> tag and startup your Java applet in its JVM (Java Virtual Machine). There's a JVM in ALL browsers!
When you invoke a procedure in jLogo or a method in Java, you may need to provide arguments as part of the invocation.
When a procedure or method is declared to have/expect parameters, the invocation must include things, one for each expected parameter. The things provided are called actual arguments. Think of an actual argument as some real thing that is substituted for a parameter in the method's definition when the code is executed.
An array is a collection of elements (things). The collection has one identifier (name) used to access any of its elements. This name is used together with something called an index to access the individual elements.
In Logo, the index values are positive integers, one for the first element, two for the second element, etc... Elements are accessed with the ITEM and SETITEM commands.
In Java, the elements must all be of the same type. The index values start with zero for the first element, one for the second element, etc... up to number-of-elements-minus-one for the last element. The index, an expression, is placed in square brackets which follow the array's identifier.
Back to HomePage