click below
click below
Normal Size Small Size show me how
APCSA Q2 Vocab
a
| Term | Definition |
|---|---|
| Precondition | the state that the parameters (or the program) should be in in order for the method/program you’re writing code for to run. |
| Postcondition | a condition that must always be true after the execution of a section of program code |
| Declaring a variable | A statement that defines a variable with a data type; giving a variable a data type and a name only |
| Initializing a variable | The assignment of a value to a variable |
| Instantiation | To create an object from a class |
| Jagged 2D Array | When the rows in a 2D array have different lengths |
| Token | Basic unit of what you're scanning, the next "thing" that is returned by the next method of a Scanner object |
| Tokenize | To break an input source up into tokens |
| Delimiter | The character used to indicate separate tokens (whitespace by default for Scanner) |
| Input source | Where the Scanner is looking for input, i.e. what the Scanner is scanning |
| Object | a particular instance of a class. |
| Class | a blueprint; the definition of what something is and how it should behave. |
| Null pointer exception | When code attempts to use an object reference that is storing the null value |
| Dereference | When dot operator (dot notation) is used for accessing an object's members (variables / methods) |
| For each loop | Aka enhanced for loop. A loop that iterates through each element in a collection of elements from beginning to end without an index number; It can be used in place of a standard for loop when the index variable is not necessary. |
| Indexed For loop | Standard for loop that uses a loop control variable to refer to the index number of an element in a collection |
| constructor | a special method with no return type and the same name as the class |
| Default constructor | A constructor with zero parameters |
| Overloaded methods | have the same name and return type, but have different parameter lists |
| Dot notation | To call a method on an object with a period in between the object name and method name |
| Instance variables | variables that belong to every object (instance) of a class should be declared (only!) below the class header, and initialized in the constructor |
| Local variables | variables are variables that are declared inside a method – their scope is only inside the method itself |
| Instance methods | Methods written inside a class (that do not say ‘static’ in method header) |
| Reference type variable | Custom type variable that stores a reference to an object |
| Access modifier | Sets the accessibility for a method, class, or variable |
| Encapsulation | Combining an object’s data (state) and methods (behavior) into a single unit called a class |
| Information hiding | The concept that another class does not need to know about the inner workings of a given class in order to use the operations for the object |
| Client code | The “Runner” or “Tester” class that contains the main method which instantiates the objects of the other classes in the project |