Overview
AP Computer Science A Practice 1 - Design Code is the computational thinking practice where you plan a solution before writing it. Instead of analyzing existing code, you decide how a program should be structured and figure out what information you can pull from a set of data. The grouping description says it directly: determine an appropriate program design and develop algorithms.
This practice shows up only on the multiple-choice section. It is not assessed on the free-response questions. On the exam, Practice 1 carries an approximate weighting of 2 to 10 percent of the multiple-choice section, so it is a smaller but real slice of your score.
Think of this practice as the "choose the right blueprint" skill. You are not running code line by line. You are picking the design that fits the task or identifying which data can answer a question.

What Practice 1 - Design Code Means
Practice 1 covers two related decisions:
- Choosing how to organize a program so it solves a problem cleanly
- Recognizing what a data set can actually tell you, and what it cannot
Both decisions happen before or instead of writing detailed code. You are reasoning about structure and information, not tracing output.
This practice maps to two CED skills:
- 1.A Determine an appropriate program design to solve a problem or accomplish a task.
- 1.B Determine what knowledge can be extracted from data.
What This Practice Requires
Skill 1.A: Determine an appropriate program design
You choose the design that best fits a stated goal. This often means reading a description of a class or program and selecting the version that follows good design conventions.
Common design decisions in AP CSA:
- Should instance variables be private and methods public? Encapsulation usually means data is private and accessor methods are public.
- What return type fits the data? A rating from 0.0 to 5.0 needs
double, notint, because it can hold decimal values. - Which attributes and behaviors belong in a class? You match real-world entities to instance variables and methods.
A class design diagram question is a typical 1.A task. You compare diagrams and pick the one with correct access modifiers and correct data types.
Skill 1.B: Determine what knowledge can be extracted from data
You look at one or more data sets and decide which combination answers a specific question. The key is matching the fields you have to the information you need.
To extract useful knowledge you usually need:
- A shared key that links data sets together, like a customer ID number
- The actual variables that the question asks about, like age or download history
If two data sets do not share a linking field, or do not contain the needed attribute, they cannot answer the question even if they look related.
Skills You Need for This Practice
- Read a problem statement and translate it into structure, not syntax
- Apply encapsulation: private data, public accessors
- Match data types to the values they must store (
int,double,String,boolean) - Identify which class should hold a given attribute or method
- Spot the shared key that lets two data sets be combined
- Tell the difference between data you have and data you need
How It Shows Up on the AP Exam
Practice 1 appears only on the multiple-choice section. The free-response questions assess Practice 2 (and analysis-related practices), so you will not write Practice 1 answers in the FRQ section.
What to expect for each skill:
- 1.A questions often give a class description and ask which design or class diagram is most appropriate. You compare access modifiers and return types across answer choices.
- 1.B questions describe several data sets and ask which two can be combined to answer a research question. You trace which fields link and which fields hold the target information.
Practical tip: these questions reward careful reading more than coding speed. The correct answer is usually about conventions and matching, not about tracing execution.
Examples Across the Course
Practice 1 connects to topics from multiple units. Here are varied examples.
Unit 3, Class Creation (1.A). A Movie class needs a title and an average rating from 0.0 to 5.0, plus methods to access them outside the class. The best design keeps title and rating private, uses double for the rating so decimals fit, and makes getTitle and getRating public. A design with public instance variables or an int rating is the wrong blueprint.
Unit 4, Data Collections (1.B). A researcher wants to know which age group is more likely to have downloaded a certain app. To answer this, you need each customer's age and each customer's list of downloaded apps, linked by customer ID. The data set of customer IDs with ages combined with the data set of customer IDs with downloaded app names gives the answer. Data sets that only track the single most recent downloader cannot.
Unit 3, Class Creation (1.A). Designing a class to model a bank account means deciding that the balance should be private so it is not changed directly from outside, with public methods controlling deposits and withdrawals. That is a design choice, not a tracing question.
Unit 1, Using Objects (1.A connection). When you plan how to represent something like buttons on a remote, you decide what variables and types capture each state before writing any expressions. Choosing the representation is design thinking.
Unit 4, Data Collections (1.B connection). Predicting a volcano's next eruption from collected data only works if the data set actually records the variables you need over time. Recognizing whether the data supports the question is exactly skill 1.B.
How to Practice Practice 1 - Design Code
- For 1.A, practice reading short class descriptions and sketching your own class diagram before looking at the choices. Decide access modifiers and return types first.
- Build a quick checklist: data private, accessors public, return type matches the value range.
- For 1.B, write down the exact question being asked, then list which fields you would need to answer it. Only then check which data sets contain those fields.
- Always look for the shared key. If two data sets cannot be linked, cross them off.
- Review class design and abstraction topics from Unit 3 and the data set topics from Unit 4, since most Practice 1 questions live there.
Common Mistakes
- Making instance variables public. Good design keeps data private and exposes it through public accessor methods.
- Choosing
intfor a value that needs decimals, like a 0.0 to 5.0 rating. Match the type to the value. - Picking data sets that look topical but do not share a linking field, so they cannot actually be combined.
- Choosing data that contains the target attribute but no key, or a key but no target attribute. You need both.
- Treating Practice 1 like a tracing question. You are choosing a design or evaluating data, not computing output.
Quick Review
- Practice 1 - Design Code is about planning solutions and judging data, not running code.
- 1.A: pick the appropriate program design. Favor private data, public accessors, and correct return types.
- 1.B: decide what knowledge a data set can yield. Match needed fields to a shared linking key.
- Assessed on multiple choice only, roughly 2 to 10 percent of that section.
- Strongest connections are Unit 3 class design and Unit 4 data collections.
- Read carefully and check conventions and matching before anything else.