BFOIT - Introduction to Computer Programming

Appendix A (Jargon)

-   C   -

class variable
A class variable is a field that exists once in a Java program.  It is available as soon as the class it is declared in is loaded into the Java Virtual Machine. In order to make a field a class variable, you put a modifier, the static keyword before the field's type in its definition.

A very common use of a class variable is as a total counter, the total number of some set of things in a class.

As an example, if you had a Java program that could have a variable number of copies of some object, say classes representing CDs and cassette tapes.  The class that you define as a pattern for creating instances of CD objects will probably need a field to keep count of the total number of CDs you have.  This count field should be a class variable - one that would exist only once in the program.

Let's say you have fifty CDs - you wouldn't want every CD object to have a field in it that contains the total number of CDs in your collection.  If they did, when you got your 51st CD, you would have to change the field in 50 other CD objects!

There are situations when you want to put text into the source code of your programs - but, it's information that's only for you and others reading your code.  In other words, it's not stuff that the language's interpreter or compiler understands.  So, you need to tell the interpreter or compiler to ignore this text. 

In jLogo, comments start with a semicolon character (";") - that is not part of a word or in a sentence - and continue through the end of the line.

Java compilers have two ways to add comments to your code.  One style of comment starts with two slash characters in a row ("//") and continues through the end of the line.  A second style of comment, called a multi-line comment, starts with a slash character followed imediately by an asterisk ("/*") and ends with an asterisk followed immediately by a slash ("*/").  These character sequences, as well as all of the characters in between are ignored by the Java compiler.

A program which converts the text (source code) of a programming language into a binary form that can be performed on a computer system (virtual or real).

As an example, Java source code is input to the "javac" program, and a binary .class file is output.  The .class file can be performed by a JVM (Java Virtual Machine).

For an in-depth description, here is a link to the WikipediA entry for "compiler."

Concatenation is joining two or more separate things, placing them side-by-side, next to each other, such that they become one thing.

Java has built-in support for concatenation of Strings, e.g., "asdfg" + "hjkl" which results in a single String: "asdfghjkl"

Logo has operators for concatenation of words and/or sentences, e.g., (word "begin "end) results in a single word: "beginend

In Java, a constructor is a special method associated with a class that builds instances of the class.  Constructors create objects of the type class_identifier.

coordinate system
Much of what the lessons in this material cover is graphically oriented problems.  Graphics support provided by operating systems and computer programming languages is pretty much the same these days.  For these lessons, a single interface, called TurtleGraphics, is provided for use in both jLogo and Java.  This interface is described in the section: TurtleSpace - The Turtle's World.

But, TurtleGraphics hides a lot of complexity from you, the programmer.  It sits on top of a bunch of pixels (picture elements) in what appears to be a two dimensional array.  When TurtleGraphics turns the pixels on, by giving them color, we can see them on the display. 

Each pixel has an address: think of it as a column number and a row number on a piece of graph paper.  Instead of calling one the column number, we say it has some X value.  The row number is called the Y value.  An X,Y pair of values/numbers is called a coordinate in mathematics.  So, our pixel addresses are coordinates.  A bit about how the turtle draws is covered in the section: The Turtle's Pen (Raster Graphics).

I've checked and coordinate systems are covered in 7th/8th grade Math books these days.  Dig yours up and check it out.  It may be in the chapters that cover a "number line" or "signed numbers." In Longfellow's Math Book: Gateways to Algebra and Geometry, published by McDougal, Littel & Company, Chapter 6.8 (Two-Dimensional Graphs) covers a rectangular coordinate system.

Other jargon:  A   B   C   D   E   F  G H  I   J  K  L   M  N  O   P  Q  R   S   T  U  V   W  X Y Z

Back to HomePage

Public Domain Mark
This work (BFOIT: Introduction to Computer Programming, by Guy M. Haas),
identified by Berkeley Foundation for Opportunities in IT (BFOIT),
is free of known copyright restrictions.