AP Computer Science A: Logic & Control Structures

0.0(0)
Studied by 0 people
0%Unit 2 Mastery
0%Exam Mastery
Build your Mastery score
multiple choiceMultiple Choice
call kaiCall Kai
Supplemental Materials
Card Sorting

1/27

Last updated 8:27 PM on 3/4/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

28 Terms

1
New cards

Algorithm

A finite sequence of well-defined instructions to solve a specific problem.

2
New cards

Sequencing

Executing instructions one after another in order.

3
New cards

Selection (Conditionals)

Deciding which part of an algorithm to run based on a boolean condition.

4
New cards

Iteration (Repetition)

Repeating a section of code multiple times, such as in loops.

5
New cards

Boolean Expression

A code snippet that evaluates to either true or false.

6
New cards

Relational Operators

Operators in Java used to compare primitive values, resulting in a boolean.

7
New cards

==

Equal to operator that checks if two values are the same.

8
New cards

!=

Not equal to operator that checks if two values are different.

9
New cards

<

Less than operator used to compare two values.

10
New cards

>

Greater than operator used to compare two values.

11
New cards

<=

Less than or equal to operator used to compare two values.

12
New cards

>=

Greater than or equal to operator used to compare two values.

13
New cards

If Statement

A control flow statement that executes a block of code when a condition is true.

14
New cards

Control Flow

The order in which individual statements or instructions are executed.

15
New cards

Single-Way Selection

A conditional structure where code runs only if the condition is true.

16
New cards

If-Else Statement

A conditional structure that executes one block if true, another if false.

17
New cards

Multi-Way Selection (Else-If)

Chained conditions that allow for multiple possible execution paths.

18
New cards

Logical Operators

Operators that combine boolean expressions to evaluate multiple conditions.

19
New cards

! (NOT)

Logical operator that inverts the boolean value.

20
New cards

&& (AND)

Logical operator that is true only if both operands are true.

21
New cards

|| (OR)

Logical operator that is true if at least one operand is true.

22
New cards

Short-Circuit Evaluation

Java's optimization where it skips evaluating certain operands based on prior results.

23
New cards

De Morgan's Laws

Rules for simplifying boolean expressions by distributing the NOT operator.

24
New cards

Comparing Objects

The method of checking equality for objects in Java using == or .equals().

25
New cards

Correct String Comparison

Use .equals() to compare String contents, not ==.

26
New cards

Common Mistakes in Conditionals

Includes errors like confusing = with ==, and improper use of semicolons.

27
New cards

Boundary Errors

Mistakes made by confusing comparison operators, leading to off-by-one errors.

28
New cards

Negation of Ranges

Incorrectly negating ranges in boolean expressions can lead to logical errors.

Explore top flashcards

flashcards
faf
40
Updated 956d ago
0.0(0)
flashcards
faf
40
Updated 956d ago
0.0(0)