What is AP Computer Science Principles unit 1?
Creative Development is about the process behind building computing innovations, not just the end product. The College Board wants you to understand that good programs come from working with others, gathering user feedback, designing deliberately, and testing carefully.
Unit 1 covers four topics: how collaboration improves computing innovations (1.1), what programs do and how inputs and outputs work (1.2), how programs are designed and documented through iterative and incremental processes (1.3), and how to find and fix logic, syntax, run-time, and overflow errors (1.4).
Collaboration improves innovations
Diverse teams catch bias, incorporate more perspectives, and produce innovations that work for a wider range of users. Pair programming and online collaboration tools like shared documents and version control support this process.
Programs have function, purpose, inputs, and outputs
A program's purpose is why it was created, and its function is what it does. Inputs can be tactile, audio, visual, or text, and they drive outputs. In event-driven programming, code runs when triggered by events like key presses or mouse clicks rather than in strict sequence.
Development is iterative and must be documented
The four common development phases are investigating, designing, prototyping, and testing. Iterative development means revisiting earlier phases based on feedback. Documentation through comments and written descriptions helps others understand and maintain code.
The big idea: computing innovations are built, not just writtenUnit 1 frames the entire course by showing that programs are the result of deliberate human choices: who collaborates, what users need, how the design evolves, and how errors get caught. These ideas connect directly to the Create Performance Task, where you must document your own development process and explain your program's purpose, function, and testing.
Unit 1 review notes
1.1
Collaboration
Computing innovations improve when teams include people with different backgrounds and skills. Collaboration reduces bias because diverse perspectives surface assumptions that a homogeneous team might miss. Consulting and communicating with actual users is a required part of the development process, not optional.
- Computing innovation: Any innovation with a program as an integral part of its function. Can be physical (self-driving car), nonphysical software (photo editing app), or a nonphysical concept (e-commerce).
- Pair programming: A collaboration model where one programmer writes code while the other reviews in real time, improving quality and shared understanding.
- Online collaboration tools: Shared documents, version control systems, and collaborative IDEs allow programmers to share code, give feedback, and work asynchronously.
- Interpersonal skills: Effective teams practice communication, consensus building, conflict resolution, and negotiation to keep development on track.
- User consultation: Gathering information from potential users helps developers understand diverse needs and build programs that reflect those perspectives.
Can you explain two specific ways that including diverse perspectives improves a computing innovation? Can you name the four interpersonal skills the AP exam expects you to know?
| Collaboration Model | How It Works | Key Benefit |
|---|
| Pair programming | Two programmers at one workstation, one writes and one reviews | Real-time error catching and knowledge sharing |
| Online tools (e.g., shared docs, version control) | Asynchronous sharing and feedback on code or documents | Supports distributed teams and tracks changes over time |
1.2
Program Function and Purpose
Every program exists to solve a problem or support creative expression. Knowing the purpose helps developers build the right thing. Function describes what the program does during execution, including how it responds to inputs and produces outputs. Event-driven programs do not run top to bottom; they wait for defined events to trigger specific code.
- Program purpose: Why a computing innovation was created: to solve a problem or pursue creative expression.
- Program function: What a program does during execution, often described by how a user interacts with it.
- Code segment: A collection of program statements that is part of a larger program.
- Program inputs: Data sent to a program for processing. Can be tactile, audio, visual, or text, and can come from users or other programs.
- Event-driven programming: A model where program statements execute when triggered by events such as key presses, mouse clicks, or program start, rather than through sequential flow.
Can you distinguish between a program's purpose and its function? Can you give an example of an event and explain how it triggers program behavior?
| Concept | Definition | Example |
|---|
| Purpose | Why the program was created | A navigation app exists to help users find routes |
| Function | What the program does during execution | The app takes a destination input and outputs turn-by-turn directions |
| Input | Data sent to the program | User types a destination address |
| Output | Data sent from the program to a device | Map display and audio directions |
1.3
Program Design and Development
Programs are developed through phases: investigating and reflecting, designing, prototyping, and testing. Iterative development means you cycle back through earlier phases when testing reveals problems. Incremental development means you build and verify one piece at a time before adding it to the whole. Documentation through comments and written descriptions is required throughout, not just at the end. Any code from another source must be acknowledged in documentation.
- Iterative development: A process that requires refinement and revision based on feedback, testing, or reflection, which may mean revisiting earlier phases.
- Incremental development: Breaking a program into smaller pieces and verifying each piece works before combining it with the rest.
- Program requirements: A description of how a program must function, including required user interactions. Gathered through surveys, interviews, user testing, and direct observation.
- Program documentation: Written descriptions of what code segments, events, procedures, or programs do and how they were developed.
- Comments: Text written into source code to explain it to human readers. Comments do not affect how the program runs.
Can you explain the difference between iterative and incremental development? Can you name three investigation methods used to gather program requirements?
| Development Type | Core Idea | When You Revisit Earlier Work |
|---|
| Iterative | Refine through repeated cycles based on feedback or testing | Yes, revisiting earlier phases is expected and built into the process |
| Incremental | Build and verify one piece at a time before adding to the whole | Only if a piece fails; focus is on completing verified chunks |
1.4
Identifying and Correcting Errors
There are four error types you must know for the AP exam. Logic errors cause incorrect behavior even when the code runs. Syntax errors break the rules of the programming language and usually prevent the program from running at all. Run-time errors occur during execution. Overflow errors happen when a number exceeds the defined range a computer can handle. Finding errors requires deliberate testing with defined inputs, including values at or just beyond the extremes of expected input.
- Logic error: A mistake in the algorithm that causes incorrect or unexpected behavior. The code may run without crashing but produces wrong results.
- Syntax error: A violation of the programming language's rules. Usually caught before the program runs.
- Run-time error: An error that occurs while the program is executing. Each programming language defines its own run-time errors.
- Overflow error: Occurs when a computer tries to handle a number outside the defined range of values it can store.
- Hand tracing: Manually stepping through code line by line, tracking variable values at each step, to find where behavior diverges from expectations.
Can you identify which error type matches a given scenario? Can you explain why testing with boundary inputs is important for finding errors?
| Error Type | When It Occurs | Example |
|---|
| Logic error | During or after execution; code runs but gives wrong output | A loop runs one too many times, producing an off-by-one result |
| Syntax error | Before execution; language rules violated | Missing closing parenthesis in a function call |
| Run-time error | During execution | Dividing by zero when user input is 0 |
| Overflow error | During execution | Adding 1 to the maximum integer value a variable can store |
Practice AP Computer Science Principles unit 1 questions
Try AP-style multiple-choice questions and written prompts after you review the notes.
QuestionA smart thermostat is designed to reduce electricity costs for homeowners. The utility company charges higher rates during peak afternoon hours and lower rates at night. Which program behavior best achieves the purpose of cost reduction?
Pre-cooling the home during low-rate hours to minimize usage during peak times.
Maintaining a constant temperature setting throughout the entire day and night.
Increasing the cooling intensity immediately whenever the outdoor heat peaks.
Disabling the cooling system entirely whenever the user is away from the home.
QuestionA traffic simulation program crashes because it attempts to track the tire friction of every car, exceeding the computer's memory. The developer modifies the program to treat cars as simple points moving at constant speeds. How does this change correct the error using abstraction?
It reduces the model's complexity by filtering out irrelevant details, ensuring the simulation runs within the hardware's memory limits.
It reduces the model's complexity by simplifying car behavior, but the simulation still crashes because abstraction cannot eliminate memory constraints imposed by hardware limitations.
It reduces the model's complexity by filtering out irrelevant details, but increases runtime performance instead of addressing the memory overflow that caused the crash.
It reduces the model's complexity by replacing detailed physics calculations with simplified movement logic, but requires additional memory to store the abstraction layer itself.
2. Refer to your Personalized Project Reference when answering this question.