AP Computer Science Principles · Creative development
Program design and development
1Development processes
Programs are developed using a development process, which can be:
- Iterative: repeating cycles of designing, building, testing and refining, revisiting earlier stages based on feedback.
- Incremental: building the program in small working pieces, adding and testing one piece at a time.
Most real projects combine both: build a small working version, test it, improve it, then add the next feature.
Typical phases: investigating and reflecting, designing, prototyping, testing, then repeating.
Iterative development cycles back through the phases after each round of feedback
Check yourself
An incremental process means:
Show the answer
Building and testing the program in small pieces
Piece by piece.
2Investigating and designing
Investigation finds out what the program must do:
- surveys, interviews and observing users;
- identifying requirements (what the program must do) and constraints (limits such as time, budget, devices);
- writing a program specification that defines the requirements.
Design plans the solution before coding: brainstorming, storyboards of screens, flowcharts, diagrams of how parts connect, and planning the user interface.
Check yourself
A program specification:
Show the answer
Defines the requirements for the program
What it must do.
3Prototypes and user testing
A prototype is an early, simplified version used to test ideas. It might be a paper sketch, a clickable mock-up or a partly working program.
Testing prototypes with users gives feedback before too much work has been done, when changes are cheap.
an app for booking sports courts.
- Investigate: interview players; requirement: book within 3 taps.
- Design: storyboard three screens.
- Prototype: paper version tested with 5 players; they cannot find the date picker.
- Refine: move the date picker to the first screen; build the first working increment.
Check yourself
Why test a prototype early with users?
Show the answer
Problems are found while they are still cheap to fix
Early feedback.
4Modularity and abstraction in design
Large programs are broken into smaller parts: procedures and modules that each do one job. This makes the program easier to:
- develop in parallel by different team members;
- test, since each part can be tested separately;
- understand and reuse.
Hiding the details of how a part works behind a name is procedural abstraction, covered further in "Procedures".
Check yourself
Breaking a program into procedures mainly helps by:
Show the answer
Making parts easier to write, test and reuse separately
Modularity.
5Going deeper: the development process, stage by stage
Programs are not written in one pass. Development is iterative (repeated cycles of refinement) and incremental (built piece by piece, with each piece working before the next is added).
The stages (visited repeatedly, in no fixed order)
1. Investigating and reflecting
- What problem is being solved, and for whom?
- Find the requirements: what the program must do, and under what constraints (time, devices, cost, accessibility).
- Methods: surveys, interviews, observation of users, studying existing programs, and direct user testing.
- The result is a program specification: a description of what the program must do, agreed before building.
2. Designing
- Plan how the requirements will be met.
- Tools: brainstorming; storyboards (sketches of each screen and how they connect); flowcharts; pseudocode; diagrams of how the program is organized into modules.
- Plan the user interface and the testing strategy.
3. Prototyping
- Build a simple, partial version to try out an idea quickly.
- It may be a paper mock-up or a program with only the core feature.
- Cheap to change, so mistakes are found early.
4. Testing
- Check that the program meets the specification.
- Use inputs that cover normal cases, boundary cases and invalid input.
- Collect feedback from users.
- Results feed back into reflection and redesign.
Iterative: after testing, the team goes back, revises the design and improves the program. Each cycle produces a better version.
Incremental: break the problem into small parts; build and test each part before adding the next. If something breaks, the cause is almost certainly in the piece just added.
Worked example (incremental plan for a quiz game)
- Display one question and accept an answer. Test.
- Check the answer and show whether it is correct. Test.
- Store several questions in a list and loop through them. Test.
- Keep and display a score. Test.
- Add a timer and a high-score table. Test.
Writing all five at once and testing at the end would make any error hard to locate.
Modularity: dividing a program into separate procedures or modules, each doing one job. Benefits: parts can be developed and tested independently, by different people; code can be reused; a change in one module need not disturb the others.
Consulting users throughout: developers are rarely typical users. Regular feedback catches misunderstandings early and reveals needs the developers did not anticipate, including accessibility: screen readers, color contrast, captions, input without a mouse.
Documentation during development
- Comments and written notes explaining what parts do and why design choices were made.
- Acknowledgement of any code, images or sound from other sources, giving the origin or author.
Development processes compared
- Ordered and intentional ("waterfall"): each stage completed fully before the next. Simple to manage, but slow to respond when requirements change.
- Exploratory: start building, learn from results, adjust. Suits new or uncertain problems.
- Modern teams generally combine planning with short, repeated cycles.
Worked example (choosing a method to investigate): a team is designing a homework-reminder app for a school.
- A survey reaches many students quickly and gives countable results (how many forget deadlines, which devices they use).
- Interviews with a few students and teachers explain the reasons in depth.
- Observation of how students record homework now shows problems people do not think to mention.
- Using all three gives both breadth and depth.
What a specification should make clear: the inputs, the outputs, what the program does in each situation, and any limits. "The app must send a reminder 24 hours before each deadline" can be tested; "the app should be helpful" cannot.
Common mistakes
- Treating development as a straight line from idea to finished product.
- Leaving all testing to the end.
- Confusing iterative (repeating and refining) with incremental (adding pieces).
- Designing without consulting users.
- Writing documentation only after the program is finished.
Check yourself
A team builds a program one small feature at a time, testing each before adding the next. What is this approach called?
Show the answer
Incremental development
The problem is broken into pieces that are each made to work before the next is added.
6For top marks
- Describe the development process as iterative: feedback leads to changes in earlier stages.
- Connect each design activity to its purpose (storyboards for interface layout, flowcharts for logic).
- Explain why getting user feedback early saves time and money.
- In the Create task, describe how you tested and refined your program in increments.
"After testing, users found the font too small, so I returned to the design stage and increased the text size before adding the next feature."
Check yourself
Which shows an iterative process?
Show the answer
Changing the design after user testing reveals a problem
Feedback loops back.
Now test yourself
This lesson has a 8-question quiz and 5 exam-style questions with mark schemes in Impera. Free, with your progress saved.
Practise in Impera