AP Computer Science Principles

Creative development

Design a program for a user

Turn a user's need into a purpose, a design, and testable behavior.

Algorithm examples use AP reference notation, including one-based list indices.

Begin with a specific need

A club organizer needs to know whether enough members can attend an event. The program's purpose is to help choose a date. Its function is to count the available members for each proposed date. Purpose explains why the program exists; function explains what it does.

Sketch the input, processing, and output before coding. Agree on what happens when nobody replies, when someone replies twice, or when two dates tie. These decisions become test cases rather than surprises at the end.

  1. 1
    User need
  2. 2
    Design
  3. 3
    Prototype
  4. 4
    Feedback

Iterate and explain decisions

Build a small version, ask someone to use it, and observe where they struggle. Separate a syntax error, which prevents code being understood, from a logic error, which produces the wrong result. Test normal, boundary, and unusual inputs after each change.

When collaborating, divide tasks and review each other's changes. Record the reason for a design choice and acknowledge code or media from other people. A working program alone does not explain how you developed it.

Check yourself

The counter runs but counts a duplicate reply twice. What kind of error is this?Show answer

A logic error. Add a test with the same member replying twice and define which reply should count.

References used to build these lessons

We used these official documents as references when building this course's lessons. They are the sources for the syllabus structure and course requirements.

College Board · Effective fall 2023