AP Computer Science Principles · Unit 1 lecture · Part 5 of 11 · 7 min

1.3 Program design and developmentA loop, not a straight line

Mr. Thompkins
Here's some good news: nobody writes a good program in one try. Not me, not the engineers at big tech companies, not anyone. Professionals plan for that, and the plan has a name.

A development process is the way a team gets from an idea to a working program. Some processes are ordered and intentional: plan everything, then build, then test. Some are exploratory: try something, see what happens, adjust. Most real projects mix both. Either way, the course names four common phases: investigating and reflecting, designing, prototyping, and testing.

InvestigateDesignPrototypeTestfeedback, testing, reflectionsend you back to any phaseand reflecta cycle, not a straight line
The development process. Testing and feedback can send you back to any earlier phase, again and again.
?Wait, what's a prototype?
A prototype is an early, rough version of a program or one of its parts, built to try out an idea. It might be a sketch on paper, a clickable mock-up, or code that does only one thing. You show it to users and learn from it before building the real thing.

Investigating and reflecting means finding out what users need and what the program must do, and later, looking back at what you learned. Designing means planning how the program will meet those needs. Prototyping means building a version. Testing means checking whether it works and whether it actually helps people. Then you reflect on the results, and very often you go around again.

Iterative and incremental

Two words describe how that going-around works, and the exam loves to test the difference. A development process that is iterative requires refinement and revision based on feedback, testing or reflection throughout the process. It may mean revisiting earlier phases: testing shows users are confused, so you go back to designing. Iterate means repeat. You keep improving the same work.

A development process that is incremental breaks the problem into smaller pieces and makes sure each piece works before adding it to the whole. Build the login screen, test it. Then add the task list, test it. Then add reminders, test those. Increment means a step added. You grow the program one tested piece at a time.

incremental112123each testedadd one piece, test it, then add the nextiterativev1v2v3revise the same work after feedback
Incremental: add one tested piece at a time. Iterative: revise the same work after feedback. Real projects do both.
?Wait, what's the difference between purpose and function again?
Purpose is why the program exists: the problem it solves for people. Function is what it does: its inputs, processing and outputs. Investigation in this phase is about understanding the purpose deeply so the function is right.
Pause and think
A team releases version 1 of a homework planner. Students say the reminder comes too late, so the team changes it to arrive the night before and tests it again. Is that iterative, incremental, or both?
I thought about it. Show me
Iterative. They revised existing work based on feedback and retested it. Nothing new was added as a separate piece. If they had then added a brand new calendar view, built and tested on its own, that addition would be incremental.
Classify the process
A team builds a recipe app. Week 1: they build only the screen that shows one recipe, and test it. Week 2: they add search, and test search. Week 3: testers say search results are confusing, so the team redesigns how results are listed and tests again. Week 4: they add a shopping list feature and test it. Which weeks show incremental development, and which show iterative?
  1. Weeks 1, 2 and 4 each add a new piece and test it before moving on: that is incremental.
    Why?
    Incremental = break into pieces, make sure each works, then add it to the whole.
  2. Week 3 revises existing work (search) because of feedback, then retests: that is iterative.
    Why?
    Iterative = refine and revise based on feedback, testing or reflection, often revisiting design.
  3. Overall, the project is both. That's normal, and exam questions sometimes test exactly that.

Answer: Incremental: weeks 1, 2 and 4. Iterative: week 3. The project as a whole uses both.

Stuck? Get a hint
  1. For each week, ask: did they add something new, or improve something that already existed?
  2. Adding a new tested piece is incremental.
  3. Revising because of feedback is iterative.
Check yourself
A developer writes a procedure that reads a file, tests it until it works, then writes a procedure that sorts the data and tests it, and only then combines them. Which describes this approach?
  1. AIterative development, because the developer keeps revising the same procedure
  2. BIncremental development, because each piece is made to work before it is added to the whole
  3. CEvent-driven development, because each procedure runs when called
  4. DExploratory development, because there is no plan
Show the answer

B. Making each piece work before combining is the definition of incremental development. Nothing in the story is revised because of feedback, so "iterative" is the trap, and event-driven describes how a program runs, not how it is built.

  • Phases: investigating and reflecting, designing, prototyping, testing. Testing and reflection can send you back to any phase.
  • Iterative: refine and revise based on feedback, testing or reflection, often revisiting earlier phases.
  • Incremental: break the problem into pieces, and make each piece work before adding it to the whole.
  • A process can be ordered and intentional or exploratory, and most real projects use both iterative and incremental steps.