๐ŸŒŸ AP Computer Science Principles - Ultimate Review Summary


๐Ÿง  Big Idea 1: Creative Development (13%)

๐Ÿ”‘ Core Concepts

  • Programming is creative and collaborative: Real innovation happens when ideas merge and minds clash productively.
  • User Interfaces (UI) let humans command machines: buttons, sliders, inputs.
  • Programs: Instruction sets executed by machines.
  • Events: Mouse clicks, key presses, etc., that trigger behaviors in software.

๐Ÿ“† Development Models

| Process | Description | |โ€”โ€”โ€”โ€”โ€”-|โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€“| | Iterative | Keep refining code via testing, revisiting, debugging | | Incremental | Build one part at a time and test as you go | | Pair Programming| One writes, one reviewsโ€”trade off often |

๐ŸŽฏ Exam Nuggets

  • Label UI elements clearly: use camelCase (e.g., submitButton)
  • Understand different errors:
    • Syntax: Invalid code structure (e.g., missing parentheses)
    • Logic: Valid code, wrong result (e.g., if (x > 90) and x = 95 shows A and B)
    • Runtime: Errors during execution (e.g., division by 0)
    • Overflow: Too-large values exceed variable limits

๐Ÿ”น Example

onEvent("submitButton", "click", function() {
    var input = getText("inputBox");
    if (input === "yes") {
        setScreen("thankYouScreen");
    }
});

๐ŸŽฎ MCQ Practice

Q: What is a benefit of pair programming?
A) Less collaboration
B) Fewer bugs due to dual perspectives โœ”๏ธ
C) One programmer does all the work
D) None of the above


๐Ÿ“Š Big Idea 2: Data (22%)

๐Ÿ“‚ Binary, Bits, Bytes

  • Bit: Smallest data unit (0 or 1)
  • Byte: 8 bits, 256 combinations
  • Base Systems: Binary (base-2), Decimal (base-10), Hex (base-16)
  • 2^n - 1 = max value with n bits (e.g., 8 bits โ†’ 255)

๐ŸŽง Analog vs Digital

  • Analog: Continuous (e.g., sound)
  • Digital: Sampled at intervals (finite precision)
  • Sampling turns analog into digital

๐Ÿ–Š๏ธ Data Abstraction

  • Hide detail, focus on whatโ€™s needed
  • Use metadata to organize/search (data about data)

๐Ÿ› ๏ธ Compression

| Type | Can fully restore? | Used for | |โ€”โ€”โ€”-|โ€”โ€”โ€”โ€”โ€”โ€”โ€“|โ€”โ€”โ€”-| | Lossless| โœ… Yes | Text, Code | | Lossy | โŒ No | Images, Sound |

๐Ÿ”น Example: Run-Length Encoding

AAAAABBBCCCC โ†’ 5A3B4C

๐ŸŽฎ MCQ Practice

Q: Why would someone use lossy compression?
A) To make files larger
B) To save storage with acceptable quality loss โœ”๏ธ
C) To remove important data
D) To increase data precision


๐Ÿงฎ Big Idea 3: Algorithms & Programming (35%)

๐ŸŽ“ Variables

  • Global: Declared outside any event/function, used anywhere
  • Local: Declared inside an event/function

๐Ÿ”„ Data Types

  • Integer, String, Boolean, List (array)
  • Booleans power if, else, and conditionals
  • Logical operators: &&, ||, !

๐Ÿ“… Control Structures

  • Sequencing: Steps in order
  • Selection: Conditional branches (if-else)
  • Iteration: Loops (for, while, repeat until)

๐Ÿ› ๏ธ Procedures

  • Block of code with optional parameters
  • Return statements: Send back a value
  • Promote procedural abstraction: reuse & simplify

๐Ÿ“ˆ Searching Algorithms

| Type | Efficient on | Description | |โ€”โ€”โ€”-|โ€”โ€”โ€”โ€”โ€“|โ€”โ€”โ€”โ€”-| | Linear | Unsorted | Check each item sequentially | | Binary | Sorted | Halve search space repeatedly |

๐Ÿ”น Example

function isEven(num) {
    return num % 2 === 0;
}

๐ŸŽฎ MCQ Practice

Q: What is the result of 7 % 3?
A) 2 โœ”๏ธ
B) 1
C) 0
D) 3


๐Ÿš€ Big Idea 4: Computer Systems & Networks (15%)

๐ŸŒŽ Internet Fundamentals

  • Internet = Network of networks
  • Protocols (TCP/IP, HTTP, UDP) enable communication
  • Open Standards: Anyone can join
  • Packets: Data chunks with metadata
  • Routing: Process of choosing a path

๐Ÿ•ฐ๏ธ Metrics

  • Bandwidth: Data transfer rate (bps)
  • Latency: Delay in transmission

๐Ÿงฐ Computing Models

| Type | Description | |โ€”โ€”โ€”โ€”-|โ€”โ€”โ€”โ€”-| | Sequential | One step at a time | | Parallel | Multiple tasks run at once | | Distributed | Multiple devices collaborate |

โฑ๏ธ Speedup = Sequential Time / Parallel Time

๐ŸŽฎ MCQ Practice

Q: What ensures a packet reaches the destination reliably and in order?
A) UDP
B) IP
C) TCP โœ”๏ธ
D) HTTP


๐ŸŒ Big Idea 5: Impact of Computing (26%)

โšก Pros & Cons

| Benefits | Harms | |โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€“|โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”-| | Innovation, Communication | Privacy loss, Bias, Misinformation | | Crowdsourcing, Creativity | Unemployment, Dependency, Surveillance |

โš–๏ธ Ethics

  • Digital Divide: Unequal access to tech
  • Bias: Algorithms reflect the bias in their data
  • Safe Computing:
    • Malware, phishing, DDoS
    • Use encryption, strong passwords, firewalls

๐Ÿ† Security Tools

| Tool | Purpose | |โ€”โ€”โ€”โ€”โ€”โ€”โ€“|โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€“| | Encryption | Obscures data with keys | | Certificate Authority| Verifies identity of websites | | MFA | Combines password + device/biometric |

๐Ÿ”น Example

Public Key (used to encrypt) โ†’ Sent to server
Private Key (used to decrypt) โ†’ Stays hidden

๐ŸŽฎ MCQ Practice

Q: What does the Certificate Authority (CA) do?
A) Sells data
B) Authenticates secure websites โœ”๏ธ
C) Monitors bandwidth
D) Hosts cloud storage


๐Ÿ’ก FINAL TIP: Indexes in pseudocode start at 1, not 0. Stay sharp.

Good luck, future CS legend. May your loops never infinite, your logic always true, and your pseudocode never pseudo-wrong.