Skip to main content

Unit 1 · Topic 1.3

1.3 Program Design and Development

Programs are built through a development process: investigate what's needed, design, build a prototype, test, and repeat. This topic covers iterative and incremental development, how investigation shapes a program's requirements, and why documentation and credit for borrowed code matter.

Key terms

  • iterative development
  • incremental development
  • program requirements
  • prototype
  • program documentation
  • comments

The development process

There's no single correct way to build a program. Some teams follow a careful plan; others explore and experiment first. But most processes include the same phases:

  • Investigating and reflecting: find out what users need and what limits the program has to work within.
  • Designing: plan how the program will meet those needs.
  • Prototyping: build a working version, often rough at first.
  • Testing: check whether it works and whether it meets the needs, then reflect on what to change.

Iterative versus incremental

Iterative development means going around the cycle again and again. After testing or getting feedback, you go back to an earlier phase, like redesigning a screen users found confusing, and improve the program. Each pass refines the whole thing.

Incremental development means breaking the program into small pieces and making sure each piece works before adding it to the rest. You might build and test the login screen, then the search feature, then the results page.

The two often go together. You can build in increments and still revise earlier pieces when feedback comes in.

Clue in the questionProcess
"Based on user feedback, the team revised the design"Iterative
"They returned to the design phase after testing"Iterative
"They built and tested each feature separately before combining them"Incremental
"They made sure the scoring procedure worked before adding the timer"Incremental

Investigation and requirements

Before designing, developers investigate to learn the program's constraints (limits like budget, deadline, device or data available) and the concerns and interests of the people who will use it. Ways to investigate include surveys, interviews, user testing of a prototype and directly watching people do the task.

What they learn becomes the program requirements: descriptions of what the program must do, including how users will interact with it. The full set of requirements is called the program's specification.

The design phase then plans how to meet the specification. It can include brainstorming, storyboarding screens, sketching the layout of the user interface, splitting the program into modules (separate parts with their own jobs), and planning how it will be tested.

Documentation and comments

Program documentation is a written description of what a code segment, event, procedure or program does and how it was developed. Comments are documentation written inside the code for people to read. The computer ignores them, so they don't change how the program runs.

Document as you go, not just at the end. Good documentation helps you remember why you wrote something, and it helps teammates understand, fix and extend code they didn't write.

Some programming environments, including some block-based ones, don't support comments. Then you document another way, such as in a separate document.

Giving credit for code you didn't write

If you use code that someone else wrote, or code you wrote together with a partner, you must say so. The acknowledgment can go in the documentation, such as a comment, and should name where the code came from or who wrote it.

For the Create task, this includes starter code from your teacher, code from an online example, an API or open-source library, and code produced with a generative AI tool. Using any of these without credit counts as plagiarism, and the penalty is a 0 for the whole Create task, written responses included.

Worked examples

Try each one yourself first, then open the solution.

  1. Example 1

    Naming the development process

    A team building a quiz app first gets the question screen working and tested. Next they build and test the scoring feature on its own, then join it to the question screen. After classmates try the app, many say the timer makes them anxious, so the team goes back and redesigns the timer as an optional setting. Which parts of this story show incremental development, and which show iterative development?

    Show the solution
    1. Step 1: Incremental development means building small pieces and confirming each works before combining. Getting the question screen working, then separately building and testing scoring before joining it, fits that.
    2. Step 2: Iterative development means revisiting earlier phases based on feedback or testing. Going back to redesign the timer after classmates' feedback fits that.

    Answer: Building and testing the question screen and scoring separately before combining them is incremental; redesigning the timer after user feedback is iterative.

Common mistakes

  • Swapping the two terms. Remember: incremental is about adding pieces one at a time; iterative is about cycling back to improve.
  • Thinking comments change what a program does. They're only for human readers.
  • Believing you only need to credit code you copied word for word. Code adapted from an example, starter code and AI-generated code all need acknowledgment.

On the exam

  • Questions often describe a team's process and ask which phase or which type of development it shows. Look for the clue words: feedback and revising point to iterative; building one piece at a time points to incremental.
  • You may be asked what documentation would help another programmer understand a code segment, including one from your own Create task program (Written Response 1 covers documentation). A good answer says what the segment does, what its inputs are, and what it returns or changes.

Connected topics

Videos

  • AP CSP Topic 1.3 - Program Design and Development - Explanations and 5 MCQs!

    Dr_WuWatch on YouTube (opens in a new tab)

  • Program design: catering contract | Intro to CS - Python | Khan Academy

    Khan AcademyWatch on YouTube (opens in a new tab)

  • Program Planning - AP CSP in Roblox

    CodeHSWatch on YouTube (opens in a new tab)

  • Karel Python - Commenting Code

    CodeHSWatch on YouTube (opens in a new tab)

  • AP CSP Topic 1.3 - Program Design and development - Speedrun! 18 MCQs

    Dr_WuWatch on YouTube (opens in a new tab)

Check yourself

4 questions on 1.3 Program Design and Development. Pick an answer to see if you got it, and why.

Question 1 of 4

A developer writes the login screen for an app and tests it until it works. She then writes the profile page and tests it on its own before connecting it to the login screen. Which development approach is she using?

Question 2 of 4

Which of the following activities belongs to the design phase of developing a program?

Question 3 of 4

A program's requirements say: "The user enters a whole number of minutes from 1 to 120. The program displays the time in hours and minutes." Why are these requirements useful when choosing test inputs?

Question 4 of 4

A programmer adds the following comment above a procedure: "Returns the total cost after a 10% discount." What effect does this comment have when the program runs?

0 of 4 answered