AP Computer Science A · Study guide

Impact of Program Design

Unit 3 · Class Creation · Topic 3.2

Impact of Program Design

The one topic in this course with no code to trace — and it is still worth points. Reliability, consequences, and who owns the code you borrowed.

Exam-day recap
  • System reliability: the program performs its tasks as expected, under stated conditions, without failure.
  • Reliability is not correctness: correct code can still fail when the situation was never anticipated.
  • Improve reliability by testing with a variety of conditions: typical, boundary, empty or absent, invalid, extreme.
  • Testing increases confidence and reveals failures, but never proves the program is reliable.
  • Creating programs has impacts on society, the economy, and culture, and these can be both beneficial and harmful.
  • Name the group affected, the mechanism, and the direction; "it affects society" names nothing.
  • Unintended harmful effects: programs meant to fill a need can harm beyond their intended use.
  • "Unintended" means the harm was not the goal, not that nobody could have anticipated it.
  • Reusing code published as open source and free to use is permitted; otherwise obtain permission and often purchase it.
  • Public is not free is not open source: visible code is not licensed, and attribution is not permission.
What this topic asks of you

Learning objective 3.2.A is explain the social and ethical implications of computing systems. Note the verb. Nothing here asks you to write a loop or predict output — you are being asked to reason about a program's effects and defend that reasoning. Three ideas carry the entire topic: reliability, impact, and intellectual property.

1Why a Programming Course Tests This

Every other topic in this course lives inside the program: syntax, state, control flow. This one steps outside it and asks what happens when the program meets the world.

That is not decoration. A program that compiles, passes its tests, and does exactly what its author intended can still fail people — by breaking under conditions nobody tried, by changing something its users depended on, or by shipping code its author had no right to ship. The exam treats those as engineering failures, not philosophy.

The skill behind the topic

The College Board pairs this topic with skill 5.A — explain how computing impacts society, economy, and culture. Everywhere else you are asked to determine, write, or trace. Here you are asked to explain, and an explanation that stops at "it could be bad" earns nothing. You need the mechanism: what the program does, who it reaches, and why the effect follows.

2System Reliability

The course gives reliability a specific definition, and the wording matters more than it looks:

Definition

System reliability refers to the program being able to perform its tasks as expected, under stated conditions, without failure.

Three qualifiers, each doing work:

PhraseWhat it commits you to
as expectedThere is a stated expectation to compare against. A program cannot be reliable in the abstract — only reliable at doing something.
under stated conditionsReliability is scoped. A program reliable for a hundred records may not be reliable for a million, and that is not a contradiction.
without failureNot "rarely fails" or "recovers well". Within the stated conditions, it does the job.

2.1 Reliability Is Not Correctness

These get conflated constantly, and the distinction is exactly what a well-written question tests.

CorrectReliable
AsksDoes it produce the right answer?Does it keep producing it, under the conditions claimed?
Fails whenThe logic is wrongThe logic is right but the situation was never anticipated
Found byChecking a resultVarying the conditions

A method that averages a list of scores can be perfectly correct for every list you tried and still fail the moment it receives an empty list. The arithmetic was never wrong. The range of conditions was too narrow.

2.2 The Course's Actual Requirement: Test With Variety

The essential knowledge does not say "test your program." It says programmers should make an effort to maximize reliability by testing the program with a variety of conditions. Variety is the requirement, and it is the part students skip.

Five kinds of condition worth naming
  1. Typical — the case the program was written for. Necessary, and the least informative.
  2. Boundary — the first and last element, the shortest allowed input, the value right at a threshold.
  3. Empty or absent — the list with nothing in it, the file with no lines, the field left blank.
  4. Invalid — data the program was never meant to receive, arriving anyway.
  5. Extreme — far more data, or far larger values, than anyone expected.

Running the same shape of input twenty times is one condition tested twenty times. Running five different shapes once each is five conditions tested. The second is worth more.

The claim that costs you the point

"Testing proves the program is reliable" is wrong, and questions are written to catch it. Testing can increase confidence and can reveal failures — it cannot demonstrate that none remain. A program that passes every test you devised is a program whose failures you have not thought of yet. Say increases reliability or reduces the chance of failure, never proves or guarantees.

2.3 Worked Example — Where the Condition Was Missing

A school builds a program to average a student's quiz scores and print the result.

public static double average(int[] scores)
{
   int total = 0;
   for (int s : scores)
   {
      total += s;
   }
   return (double) total / scores.length;
}

The method is correct. Every teacher who tried it got the right average. Then a student transferred in during the final week with no quizzes recorded, scores arrived with length 0, and the program divided by zero.

What to say about it

The failure was not an arithmetic error — the arithmetic was fine. It was a reliability failure: the stated conditions silently assumed at least one score, and that assumption was never tested. Testing with a variety of conditions — specifically the empty case — would have exposed it before a real student hit it.

2.4 What Reliability Looks Like in the Code You Write

Reliability is not only a testing habit — it shows up as decisions inside the method. Three that recur in this course:

Guard the assumption instead of hoping. The averaging method earlier assumed a non-empty array. Making the assumption visible costs one line:

if (scores.length == 0)
{
   return 0.0;      // stated behavior for the empty case
}

The value returned matters less than the fact that the empty case now has a stated behavior. Reliability was defined as performing as expected under stated conditions; a condition with no stated expectation cannot be reliable at all.

Do not let one bad element destroy the whole result. A method that stops at the first unusable value leaves the caller with nothing. One that skips it returns a usable answer for the rest — and which is right depends on the stated conditions, which is exactly the judgment being tested.

Make the boundary explicit. Loops that run to length instead of length - 1, or start at 1 instead of 0, fail only at the edges — which is why edge conditions are named separately in the testing list rather than folded into "typical".

A quick way to generate test conditions

For any method, ask what the smallest legal input is, what the largest realistic one is, and what happens if the input is absent. Those three questions produce boundary, extreme, and empty cases without any creativity, and they are where the failures actually live.

3Impact: Beneficial and Harmful at Once

The essential knowledge states that creating programs has impacts on society, the economy, and culture, and that these impacts can be both beneficial and harmful.

The word doing the work is both. Exam questions are rarely about programs that are simply bad; almost nobody writes those on purpose. They are about programs that work, help someone, and cost someone else something.

DomainWhat it coversA question might ask about
SocietyHow people live together — access, safety, fairness, who is includedAn app that only works on newer phones, and who that leaves out
EconomyWork, cost, who earns and who paysAutomation that lowers a price and removes a job in the same move
CultureHabits, expectations, what becomes normalA recommendation feed that gradually narrows what people encounter
A structure that answers the question properly

When asked for an impact, name the group affected, the mechanism, and the direction. "It affects society" names nothing. "Riders in neighborhoods the service does not cover lose access to a transport option they had before, because coverage is decided by predicted demand" names a group, a mechanism, and a direction — and it is arguable, which is what an explanation is supposed to be.

3.1 One Program, Analyzed Across All Three Domains

A city releases a free app that reports live bus arrival times from vehicle sensors. It is popular and it works.

DomainBeneficialHarmful
SocietyRiders wait less and travel later with more confidence, which matters most to people without a carRiders without a smartphone or data now have strictly worse information than everyone else at the same stop
EconomyRidership rises; printed timetables cost less to maintainThe printed timetables get cut, and the saving lands on whoever was still reading them
CultureChecking before leaving becomes normal; the system feels dependableTurning up and waiting stops being normal, so a sensor outage is now experienced as the service failing
Read the shape of that table

Every row has both columns filled, and the harm is usually the benefit seen from a different position. The saving that funds the app is the timetable someone else was using. That is what both beneficial and harmful means in practice, and a response that fills only one column has not finished the analysis.

4Unintended Harmful Effects

This is the highest-yield sentence in the whole topic:

Essential knowledge, stated plainly

Programs meant to fill a need or solve a problem can have unintended harmful effects beyond their intended use.

Three commitments are packed in there. The program was meant well — it had a real need to fill. The harm was unintended — nobody planned it. And it occurred beyond the intended use — the program left the situation it was designed for and kept working anyway.

4.1 Three Shapes This Takes

Repurposing. A program built for one job is used for another it was never validated against. A tool written to flag unusual spending on a company card gets pointed at employee timesheets, where "unusual" means something entirely different and the flags are meaningless — but they still look authoritative.

Scale. Behavior that is harmless for a few people becomes harmful for many. A queuing system that puts the newest request last is fair with a dozen requests and, with a hundred thousand, guarantees that some requests are never served at all.

Displacement. The program succeeds and something else quietly stops. A school moves permission slips to an online form, submissions rise, and the families without reliable internet — who were fine with paper — now miss deadlines. Nothing broke. The path they relied on was removed.

"Unintended" does not mean "unforeseeable"

This distinction is worth points. Unintended means the harm was not the goal. It does not mean nobody could have anticipated it, and it does not excuse the programmer. The whole reason this sits in a course on program design is that design is where the anticipating happens — asking who else might use this, what happens at ten times the size, and what people were doing before.

4.2 Worked Example — A Program That Worked Exactly as Designed

A district builds a tool that assigns students to bus routes by shortest travel time. It works. Average ride time drops by eleven minutes, and families notice.

Two terms later, three effects have appeared that nobody asked for. Students living between two schools are reassigned each year as routes rebalance, so friendship groups keep breaking. Two long-standing stops were dropped because serving them cost more minutes than they saved, and the families there now drive. And because the optimizer treats every minute as identical, a route that saves time overall now leaves the earliest students waiting in the dark.

Why this is the shape the exam likes

The program is not broken and the goal was good. The harm comes from what the objective left out: the optimizer was told to minimize travel time and was never told that continuity, coverage, and daylight mattered. That is the recognizable pattern — an unmeasured value quietly traded away for the measured one.

5Legal Issues and Intellectual Property

The third essential knowledge is the most concrete thing in the topic, and the easiest to get right if you know the rule.

The rule as the course states it

Programmers often reuse code written by others and published as open source and free to use. Incorporating code that is not published as open source requires the programmer to obtain permission and often purchase the code before integrating it.

5.1 The Default Is Not "Free"

The intuition students bring is that code found online is free unless it says otherwise. The rule runs the other way: reuse is permitted when the code has been published as open source and free to use. Absent that, permission is required — and often payment.

SituationMay you integrate it?
Published as open source, free to useYes — this is the case the course names
Posted publicly, no license statedNot on that basis alone. Visible is not the same as licensed
Commercial libraryPermission, and usually purchase
A classmate's code, with their blessingPermission obtained — though course policy is a separate question
Three words that are not synonyms

Free means no payment. Open source means the source is published under terms that permit reuse. Public means you can see it. Code can be public and neither free nor open source — which is precisely the case the essential knowledge is warning about. An answer that treats "I found it online" as permission is wrong.

5.2 Attribution Is Not Permission

Crediting the author is good practice and is required by many open-source licenses. It is not a substitute for the right to use the code. If permission was needed, naming the author does not supply it — and if the code was open source and free to use, you had permission before you wrote the credit line.

5.3 Working Through Four Cases

A sorting routine from a textbook's companion site, marked "free for classroom use." Free for a stated purpose is not the same as published open source and free to use. For a class assignment it fits the stated purpose; shipping it inside a product you sell goes beyond it, and that needs permission.

A snippet from a public forum answer with no license given. Public, and not licensed. The safe reading is that permission has not been granted. In practice programmers re-implement the idea rather than copy the lines — understanding an approach and reusing an expression of it are different acts.

An open-source library that requires derived work to remain open source. Still open source, still reusable — but the license carries an obligation. This is why "open source" is about published terms, not about the absence of terms.

Code you wrote at a summer job. Often owned by the employer rather than by you. Authorship and ownership are not the same thing, which is the same lesson as the forum snippet arriving from the other direction.

One question resolves nearly every case

Has this code been published under terms that permit what I am about to do with it? Not "can I see it", not "did I pay nothing", and not "will I credit the author" — only whether the terms cover the use.

6How This Topic Is Actually Assessed

Do not expect a code-tracing question. Expect a short scenario and a question about what follows from it.

6.1 Reading the Question Type

If the stem says…It is testing…Look for…
"works as expected under…", "fails when…"Reliability (3.2.A.1)An untested condition — usually empty, boundary, or extreme
"impact on…", "effect of releasing…"Impact (3.2.A.2)An answer naming a group and a mechanism, not a vague good/bad
"uses code written by…", "a library that…"Intellectual property (3.2.A.3)Whether it was published open source and free to use
"unintended…", "beyond its intended use"Unintended effects (3.2.A.2)The program working correctly, outside the situation it was built for

6.2 A Model Explanation

A team releases a free app that finds the cheapest fuel nearby using prices submitted by drivers. Describe one unintended harmful effect.

Too thin to score

"It could be harmful because the data might be wrong and people would be upset." No group, no mechanism, and "might be wrong" is about correctness, not about an effect beyond intended use.

Scores

"Because drivers submit the prices, stations near active users are covered well and stations in areas with few users are barely listed. Drivers in those areas see fewer options and may pay more — the opposite of the app's purpose — even though the app works exactly as designed for the users it does have."

Group: drivers in low-coverage areas. Mechanism: coverage follows where users already are. Direction: harmful, and beyond the intended use.

6.3 Traps

Four ways to lose an easy point
  1. Answering "is this good or bad?" The essential knowledge says impacts can be both. An answer that only sees one side has usually missed the question.
  2. Blaming the user. "People should have checked" does not describe an impact of the program.
  3. Treating the technology as neutral. Design choices — what gets measured, who is defaulted in — produce effects. That is the premise of the topic.
  4. Claiming testing guarantees reliability. Covered in section 2; it is the most common wrong option in the whole topic.

7Check Yourself

Six items in the shapes this topic uses. Work each before reading the response.

7.1 Reliability

A method returns the highest value in an array of test scores. It has been run on twenty different classes and always returned the right answer. Is it reliable?

Response

Not established. Twenty runs on the same shape of input — a populated array of ordinary scores — is one condition tested twenty times. Reliability is claimed under stated conditions, so the open questions are the empty array, a single-element array, and values outside the expected range. Correct so far is not the same as reliable.

7.2 Reliability, Stated Conditions

A program is documented as handling class sizes up to 40. A school with 600 students in one assembly uses it and it fails. Is that a reliability failure?

Response

Not by the definition. Reliability is performance as expected under stated conditions, and 600 is outside the stated condition of 40. The program was used beyond its scope. There is still a design criticism — failing loudly at 41 is better than producing a quietly wrong answer — but the reliability claim itself was not broken.

7.3 Impact

A library replaces its paper request slips with an online form. Give one beneficial and one harmful impact, naming who is affected.

Response

Beneficial: patrons can request material without traveling, and staff spend less time transcribing, so requests are filled faster. Harmful: patrons who relied on the paper route — often those without home internet, who are also the people most dependent on the library's own computers — must now come in specifically to use a terminal to request an item they could previously request at the desk. Same change, opposite direction, different group.

7.4 Unintended Effects

A study app awards a streak badge for consecutive days of practice. Users love it. Identify an unintended harmful effect and say why it counts as unintended.

Response

Students protect the streak rather than study — a one-minute session at midnight keeps the badge and teaches nothing, and losing a long streak makes some abandon the app entirely. It is unintended because the feature was built to encourage regular practice, and the harm arrives through the measure standing in for the goal. The program works exactly as designed; what it rewards is not quite what was wanted.

7.5 Intellectual Property

A student finds a well-written matrix class on a public code-hosting site. There is no license file. They include it in a program they plan to sell. Any problem?

Response

Yes. Publicly visible is not published as open source and free to use. With no license granting reuse, permission has not been given, and incorporating it requires obtaining that permission — often with purchase, particularly for commercial use. Adding a credit line does not supply the permission.

7.6 Putting It Together

A team ships a scheduling tool built from an open-source calendar library. It halves the time managers spend on rosters. Within a month, staff report shifts changing with less notice. Which parts of this topic are in play?

Response

Two of the three. Intellectual property is satisfied — the library was published open source and free to use, so reuse is permitted (subject to its terms). Impact is where the interesting part sits: the economic benefit is real and measured, while the harm lands on staff whose schedules are now easier to change, which nobody set out to do. That is an unintended harmful effect beyond the intended use — the tool was meant to save managers time, not to make shifts less stable. Reliability is not in play; nothing failed.

8Summary

IdeaWhat to remember
System reliabilityPerforms as expected, under stated conditions, without failure
Improving itTest with a variety of conditions — typical, boundary, empty, invalid, extreme
What testing doesIncreases confidence and reveals failures; never proves their absence
ImpactReaches society, economy, and culture, and can be beneficial and harmful at once
Unintended effectsA well-meant program, working correctly, beyond its intended use
Reusing codeOpen source and free to use → permitted. Otherwise → permission, often purchase
Public ≠ free ≠ open sourceVisible code is not licensed code; attribution is not permission
The habit this topic is really teaching

Before releasing anything, three questions: what conditions have I not tried? — who else might this reach, and what were they doing before? — do I have the right to ship every line of this? Answer those and the exam questions answer themselves.