upgrade
upgrade
🔀AP Computer Science A Unit 2 Vocabulary

79 essential vocabulary terms and definitions for Unit 2 – Selection and Iteration

Study Unit 2
Practice Vocabulary
🔀Unit 2 – Selection and Iteration
Topics

🔀Unit 2 – Selection and Iteration

TermDefinition
Boolean expressionAn expression that evaluates to either true or false, used to control the execution of loops and conditional statements.
Boolean valueData values that can only be true or false, used in logical operations and conditional statements.
object referenceA value that points to the memory location where an object is stored, allowing access to that object.
primitive data typeBasic data types in Java such as int, double, boolean, and char that are not objects.
reference typeA data type that holds a reference (memory address) to an object rather than storing the object's value directly.
relational operatorOperators used to compare values, including ==, !=, <, >, <=, and >=.

TermDefinition
!=The not-equal operator used to determine if two object references are different or if a reference does not equal a value.
==The equality operator used to compare object references or values; for objects, it checks if two variables reference the same object in memory.
Boolean expressionAn expression that evaluates to either true or false, used to control the execution of loops and conditional statements.
De Morgan's lawA logical rule that allows conversion between equivalent Boolean expressions: !(a && b) is equivalent to !a || !b, and !(a || b) is equivalent to !a && !b.
equals methodA String method that returns true if the string contains the same sequence of characters as another string, and false otherwise.
equivalencyThe state of two objects being equal based on specified criteria, typically determined by comparing their attributes.
equivalentHaving the same value or producing the same result; two Boolean expressions are equivalent if they evaluate to the same value in all cases.
nullA special value indicating that a reference variable does not currently reference any object.
object referenceA value that points to the memory location where an object is stored, allowing access to that object.
truth tableA table that shows all possible input combinations and their corresponding output values, used to prove whether Boolean expressions are equivalent.

TermDefinition
character reversalThe process of rearranging the characters in a string in reverse order, from last to first.
string algorithmProcedures or methods designed to perform operations on strings, such as searching, modifying, or analyzing text data.
substringContiguous sequences of characters within a larger string.

TermDefinition
Boolean expressionAn expression that evaluates to either true or false, used to control the execution of loops and conditional statements.
for loopA type of iterative statement that repeats a block of code a specified number of times using initialization, a Boolean expression, and an update statement.
initializationThe first assignment of a value to a variable.
iteration statementA control structure that repeats a block of code multiple times based on a condition.
loop bodyThe segment of code that is repeated within an iteration statement.
loop control variableThe variable initialized in a for loop that is used to control the number of iterations.
updateThe part of a for loop header that modifies the loop control variable after each iteration of the loop body.
while loopAn iterative statement that repeatedly executes a block of code as long as a specified Boolean expression evaluates to true.

TermDefinition
iteration statementA control structure that repeats a block of code multiple times based on a condition.
run-timeThe period during which a program is executing or running.
statement execution countThe number of times a statement is executed during the running of a program.
tracingThe process of manually following the execution of a program step-by-step to understand how statements are executed.

TermDefinition
Boolean expressionAn expression that evaluates to either true or false, used to control the execution of loops and conditional statements.
flow of controlThe order in which statements in a program are executed, which can be interrupted by method calls and resumed after the method completes.
infinite loopA loop that never terminates because the Boolean expression always evaluates to true.
iterationA form of repetition in which code is executed zero or more times based on a condition.
iteration statementA control structure that repeats a block of code multiple times based on a condition.
iterative processA process that repeats a segment of code multiple times to achieve a desired result.
loop bodyThe segment of code that is repeated within an iteration statement.
off by one errorAn error that occurs when an iteration statement loops one time too many or one time too few.
while loopAn iterative statement that repeatedly executes a block of code as long as a specified Boolean expression evaluates to true.

TermDefinition
inner loopThe iteration statement contained within the body of another iteration statement that executes completely for each iteration of the outer loop.
iteration statementA control structure that repeats a block of code multiple times based on a condition.
nested iterationIteration statements that appear within the body of another iteration statement, where the inner loop completes all its iterations before the outer loop advances to its next iteration.
outer loopThe iteration statement that contains another iteration statement within its body.

TermDefinition
! (not)A logical operator that negates a Boolean expression, returning true if the expression is false and false if the expression is true.
&& (and)A logical operator that returns true only when both Boolean expressions are true, and false otherwise.
|| (or)A logical operator that returns true when at least one of the Boolean expressions is true, and false only when both are false.
compound Boolean expressionBoolean expressions that combine multiple Boolean values or conditions using logical operators to produce a single Boolean result.
logical operatorSymbols or keywords used to combine or modify Boolean expressions: ! (not), && (and), and || (or).
order of precedenceThe sequence in which logical operators are evaluated in an expression: ! (not) first, && (and) second, then || (or).
short-circuit evaluationAn optimization where a logical operation using && or || stops evaluating as soon as the final result can be determined, without evaluating all expressions.

TermDefinition
Boolean expressionAn expression that evaluates to either true or false, used to control the execution of loops and conditional statements.
branching logical processProgram flow that divides into different paths based on conditional statements, allowing different code to execute depending on whether conditions are true or false.
flow of controlThe order in which statements in a program are executed, which can be interrupted by method calls and resumed after the method completes.
if statementA selection statement that executes a code segment based on whether a Boolean expression is true or false.
if-else statementA selection statement that provides two alternative code segments: one executed when a Boolean expression is true and another when it is false.
one-way selectionAn if statement that executes a code segment only when a Boolean expression is true.
selection statementProgramming statements that control the flow of execution by choosing which code segments to run based on conditions.
sequential executionThe default flow of a program where statements are executed one after another in the order they appear.
two-way selectionAn if-else statement that executes one code segment when a Boolean expression is true and a different segment when it is false.

TermDefinition
Boolean expressionAn expression that evaluates to either true or false, used to control the execution of loops and conditional statements.
branching logical processProgram flow that divides into different paths based on conditional statements, allowing different code to execute depending on whether conditions are true or false.
if-else-ifA conditional statement structure that tests multiple conditions in sequence, executing the code block for the first condition that evaluates to true.
multiway selectionA control structure using if-else-if statements to choose one of several code segments to execute based on different conditions.
nested if statementIf, if-else, or if-else-if statements placed within other if, if-else, or if-else-if statements to create multiple levels of conditional branching.

TermDefinition
algorithmA step-by-step procedure or set of rules designed to solve a problem or accomplish a task.
decision makingThe process in an algorithm where a choice is made based on evaluating a condition to determine which path to follow.
loopingA programming construct that repeats a block of code multiple times as part of an algorithm's repetition.
repetitionA control structure in an algorithm where a process repeats itself until a desired outcome is reached.
selectionA control structure in an algorithm that makes a choice about how execution will proceed based on a true or false decision.
sequencingThe order in which steps in a process are completed, with steps executed one at a time.

TermDefinition
algorithmA step-by-step procedure or set of rules designed to solve a problem or accomplish a task.
averageThe mean value calculated by dividing the sum of all values by the number of values.
evenly divisibleA property of an integer that can be divided by another integer with no remainder.
frequencyThe number of times a specific criterion or condition is met within a dataset or sequence.
maximum valueThe largest value in a set of data or collection of numbers.
minimum valueThe smallest value in a set of data or collection of numbers.
standard algorithmA widely recognized, established procedure for solving a common computational problem.
sumThe result of adding multiple values together.