๐Ÿ“˜ College Board Notes โ€” Sequencing

High School Student Version

โœ… What is Sequencing?

Sequencing means running instructions in a specific order, one step at a time.

Computers execute instructions exactly in the order they are written unless told otherwise.

Think of sequencing like a recipe:
  1. Preheat oven
  2. Mix ingredients
  3. Bake cake
Changing the order can change the result.

๐ŸŽฏ Why Sequencing Matters (College Board Perspective)

Programs are built using:

Sequencing is the foundation of all programs.

๐Ÿง  Key Idea

The order of instructions directly affects program output.

๐Ÿ“Œ Real-World Examples

Logging Into a System

  1. Open browser
  2. Enter username
  3. Enter password
  4. Click login

ATM Withdrawal

  1. Insert card
  2. Enter PIN
  3. Select withdrawal
  4. Receive cash

๐Ÿ’ป Programming Example (Java)

Correct Sequencing

int a = 5;
int b = 10;
int sum = a + b;

System.out.println(sum);

Incorrect Sequencing

int sum = a + b;   // ERROR
int a = 5;
int b = 10;

๐Ÿ”ฅ Execution Flow

Programs execute:

System.out.println("Step 1");
System.out.println("Step 2");
System.out.println("Step 3");

โš ๏ธ Common Student Mistakes

๐Ÿ” Tracing Example (AP Style)

int x = 3;
x = x + 2;
x = x * 4;

System.out.println(x);

Output: 20

๐Ÿงช Mini Practice

int a = 2;
int b = 3;

System.out.println(a + b);
a = 10;
System.out.println(a + b);

Output:

5
13

โญ Big Ideas to Remember

๐ŸŽ“ College Board Vocabulary