Program & UI Design (College Board AP® Computer Science Principles): Revision Note

Robert Hampton

Written by: Robert Hampton

Reviewed by: James Woodhouse

Updated on

Program design

What is program design?

  • Program design is the process of planning the structure and behavior of a program before writing code

  • The design of a program incorporates investigation to determine its requirements, what the program must do and who it is for

  • Design activities help developers think through the solution before committing to an implementation, reducing errors later

Investigation: understanding user constraints & interests

Method

Description

Example

Collecting data through surveys

Collecting opinions and preferences from a large group of users

Asking students to rate desired features of a new revision app using an online form

Interviews

In-depth conversation with individual users to understand their needs in detail

Talking with a teacher about what a grading tool must do

Direct observations

Watching users interact with an existing system to identify problems

Recording how users navigate a website and where they get stuck

User testing

Trying early versions of the program with users to gather feedback

Giving users a prototype and noting where they struggle to complete a task

Requirements & specifications

What are program requirements?

  • Program requirements describe how a program functions and may include a description of the user interactions the program must provide (for example, how a user logs in, submits an answer, or navigates between screens)

  • Requirements are identified through investigation, by studying user constraints and interests

What is a specification?

  • A program's specification defines the requirements for the program

  • In a development process, the design phase outlines how to accomplish a given specification

  • A clear specification gives the development team a shared target for what the program must do

Design activities

What happens during program design?

  • Common design activities include:

Activity

Purpose

Example

Brainstorming

Generating a range of ideas before committing to one approach

A team lists ten possible ways to structure a quiz app before agreeing on an approach

Planning and storyboarding

Mapping out the program's features and the user's journey through the screens

Listing features in priority order and sketching each screen of the app

Organizing the program into modules and functional components

Breaking the program into smaller, independent parts that can be developed and tested separately

Separating a program into a login module, a data processing module, and a display module

Creation of diagrams that represent the layouts of the user interface

Visually showing how the user will interact with the program

Sketching wireframes of each screen showing buttons, menus, and input fields

Development of a testing strategy for the program

Deciding in advance how the program will be tested and what outputs are expected for given inputs

Writing down that entering −1 should display "Invalid input" before any code is written

Examiner Tips and Tricks

  • When a question describes a team watching users, asking questions, or distributing questionnaires before building a program, it is describing investigation — the way developers identify user constraints and interests before writing any code

  • Remember that a specification defines what the program must do, while the design phase (including its activities) outlines how to build it — the AP exam may ask you to distinguish between these

  • Design activities happen before coding begins — if a question describes a team drawing diagrams, listing features, or dividing a program into modules and functional components, that is design, not development

  • For the AP Create Performance Task, you will need to describe the purpose and intended user of your program, your design decisions, and how you structured your solution — investigation and design activities are the foundation of all of these written responses

Worked Example

Before writing any code, a development team holds a meeting to divide their program into separate modules, each handling a different feature. They also write down what inputs and outputs each module will need.

Which design activity does this best describe?

(A) Investigation, because they are collecting information about user needs

(B) Testing, because they are deciding what outputs to expect

(C) Modularity and planning, because they are structuring the program into independent parts before development

(D) Iterative development, because they are refining the program through repeated cycles

[1]

Answer:

(C) Modularity and planning, because they are structuring the program into independent parts before development [1 mark]

  • The scenario describes two design activities working together: organizing the program into modules and functional components (dividing into modules), and planning (defining inputs and outputs for each module before development).

  • That combination is what makes (C) correct — investigation happens earlier, testing would come after code is written, and iterative development refers to revising a program through cycles, not structuring it.

Unlock more, it's free!

Join the 100,000+ Students that ❤️ Save My Exams

the (exam) results speak for themselves:

Robert Hampton

Author: Robert Hampton

Expertise: Computer Science Content Creator

Rob has over 16 years' experience teaching Computer Science and ICT at KS3 & GCSE levels. Rob has demonstrated strong leadership as Head of Department since 2012 and previously supported teacher development as a Specialist Leader of Education, empowering departments to excel in Computer Science. Beyond his tech expertise, Robert embraces the virtual world as an avid gamer, conquering digital battlefields when he's not coding.

James Woodhouse

Reviewer: James Woodhouse

Expertise: Computer Science & English Subject Lead

James graduated from the University of Sunderland with a degree in ICT and Computing education. He has over 14 years of experience both teaching and leading in Computer Science, specialising in teaching GCSE and A-level. James has held various leadership roles, including Head of Computer Science and coordinator positions for Key Stage 3 and Key Stage 4. James has a keen interest in networking security and technologies aimed at preventing security breaches.