AP CSP Vocabulary
Key terms used in AP Computer Science Principles

UNIT ONE - ROBOQUEST

Algorithm

An unambiguous, executable, and terminating specification of a way to solve a problem.

Abstraction

Breaking up a problem and hiding details to reduce the complexity of a task.

Accessor Method

A method that returns information but does not change the state of the program.

Ex: frontIsClear(), countMyBeepers(), facingWest()

Binary

A number system consisting of 0 and 1.

Bit

Binary digit; the smallest unit of information, having two possible values: 0 and 1.

Block

A group of statements bracketed by {}.

Byte

A number made up of eight bits. Essentially all currently manufactured computers use a byte as the smallest unit of storage in memory.

Camel Case

The preferred style of naming variables, where the first letter of every word after the first is capitalized. Ex: numBeepers, isAlive

Comment

An explanation to help the human reader understand a section of a program; ignored by the compiler.

Definite Loop

A loop that has a number of iterations set before the loop begins. Usually this is a for loop.

Hard Coding

Writing a program in such a way that its data and parameters are fixed and cannot be altered without modifying the program.


Ex: Making Karel follow an exact path to follow in a single specific maze, rather than teaching him how to navigate any maze. This is considered a bad practice.

Indefinite Loop

A loop that has an undetermined number of iterations when the loop begins. Usually this is a while loop.

Logic Error

An error in a syntactically correct program that causes it to act differently from its specification.

Ex: My program runs, but Karel crashes into a tree.

Logical Operator

An operator that can be applied to Boolean values. Processing has three logical operators: &&, ||, and !

Method

A block of code that works toward a common purpose. Also known as functions.

Method Header

The top line of a method that includes a return type, name, and list of parameters.

Mutator Method

A method that changes the state of the program but does not return information.

Ex: move(), turnLeft(), putBeeper()

Parameter

An item of information that is specified to a method when the method is called. Used to “pass” information. For example, the method public void move(int distance) has a parameter distance of type int.

Processing

A programming language developed in 2001 that is based on Java. It has a focus on ease of use, education, and visual design.

Return Type

The type of data returned by a method back to the code that called it. A method that does not return any information has a return type of void.

Statement

A syntactical unit in a program, usually referring to a single line of code.

Syntax

Rules that define how to form instructions in a particular programming language.

Syntax Error

A mistake in code that violates the rules of a language's syntax, preventing the code from compiling.

Ex: My program won't run because my curly braces are a mess.