click below
click below
Normal Size Small Size show me how
Code.Org Unit 1
Code.org's unit 1 of AP Computer science vocab
Term | Definition |
---|---|
class header | consists of the class keyword and the name of the class example: public class MyNeighborhood {} |
integrated development environment (IDE) | a software application for writing, compiling, testing and debugging program code example: repl.it, eclipse, code.org |
software | a collection of instructions that is run by a computer |
source code | a collection of programming commands |
syntax | the rules for how a programmer must write code for a computer to understand |
syntax error | a mistake in the code that does not follow a programming language's syntax example: myPainter.move() is forgetting a semicolon, so this is a syntax error. |
attribute | a characteristic of an object example: a Student object might have the attributes Gender, Age, or GPA |
behavior | an action that an object can perform example: a Student object might have the behaviors takeTest();, eatLunch();, or goToClass(); |
bug | an error in the code |
class | a programmer-defined blueprint from which objects are created example: Painter, PainterPlus can have objects created from them which can then perform certain behaviors |
constructor | a block of code that has the same name as the class and tells the computer how to create a new object example: Painter |
debugging | finding and fixing problems in an algorithm or program |
instantiate | to call the constructor to create an object example: Painter myPainter = new Painter(); |
object | an instance of a class example: myPainter, myPainter1 |
object-oriented programming | an approach to creating and using models of physical or imagined objects |
package | a collection of similar classes |
state | the attributes of an object that are represented by its instance variables |
Procedural Abstraction | allows a programmer to use a method by knowing what the method does even if they don't know how the method was written |
void method | a method that performs an action but does not return a value |
argument | a value passed to a method or constructor when the method or constructor is called example: eatLunch("sandwich");, "sandwich" is the argument |
dot operator | used to call a method in a class |
method | a named set of instructions to perform a task example: takePaint() |
parameter | a variable in the method or constructor signature that defines the type of value to receive wen the method or constructor is called example: public void eatLunch(String food);, food is a parameter |
boolean | a primitive data type that can either be true or false |
if statement | a conditional statement that only executes when the condition is true |
condition | determines whether or not to execute a block of code |
conditional statement | a statement that only executes when a condition is true |
logic error | an error that occurs when the code runs but does not do what was expected |
return | to exit a method and go back to the point in the program that called it with the requested value or information |
super keyword | a keyword used to refer to the superclass example: public PainterPlus() { super(); } |
constructor signature | the first line of the constructor which includes the public keyword, he constructor name, and the values to specify when an object is created example: public class PainterPlus extends Painter |
inheritance | an object-oriented programming principle where a subclass inherits the attributes and behaviors of a superclass example: PainterPlus inherits the attributes and behaviors of Painter. So, you can call move(); even if you are in PainterPlus as a result |
subclass | a class that extends a superclass and inherits its attributes and behaviors example: Painter is a superclass, PainterPlus is a subclass |
superclass | a class that can be extended to create subclasses example: Painter is a superclass, PainterPlus is a subclass |
method signature | consists of a name and parameter list example: public void eatLunch(String food); |
code review | the process of examining code and providing feedback to improve the quality and functionality of the program |
comment | a text note that is ignored by the compiler to explain or annotate the code |
documentation | written descriptions of the purpose and functionality of code |
programming style | a set of guidelines for formatting program code |
while loop | a control structure which executes a block of code repeatedly as long as a condition is true |
algorithm | a set of instructions to solve a problem or accomplish a task |
control structure | a conditional or iteration statement which affects the flow of a program |
efficient | getting the best outcome with the least amount of waste |
infinite loop | a loop where the boolean expression always evaluates to true example: while i is positive, add 1 to i |
iteration statement (loop) | a control structure that repeatedly executes a block of code |
pseudocode | a plain language description of the steps in an algorithm |
NOT (!) operator | a logical operator that returns true when the operand is false and returns false when the operand is true |
if-else statement/two-way selection statement | specifies a block of code to execute when the condition is true and a block of code to execute when the condition is false |
logical operator | an operator that returns a boolean value example: ==, != |
concatenation | joining two strings together example: "Hello" + " World = "Hello World" |
Method Decomposition | the process of breaking a problem down into smaller parts to write methods for each part |
edge case | a bug that occurs at the highest or lowest end of a range of possible values or in extreme situations |
redundant code | code that is unnecessary |
inheritance hierarchy | where a class serves as a superclass for more than one subclass |
open source code | code that is freely available for anyone to use, study, change, and distribute |