Before the bell
You are responsible for all of this before the end of class.
- The discussion form in the I Do deck. All three sections. If you are here, this should be done.
- Your classwork. This form on the right. Section 1 before the exit ticket pops up; Section 2 past the floor.
- Today's Bench Basics activity: Decisions Together. It opens later in class and lives on slide 4 of this deck.
- The exit ticket. It opens 15 minutes before the bell and lives on the last slide of this deck.
The classwork form is not linked yet. Use Station View and write your answers in your lab notebook with the item labels.
Putting It Together: True or False, If and Otherwise
This reading works through one Java segment that uses all three of this week's bench skills. The segment runs inside the standard wrapper, and it is read in three passes.
1int charge = 18; 2boolean pluggedIn = false; 3System.out.println(charge < 20 && !pluggedIn); 4if (charge < 20 && !pluggedIn) 5{ 6 System.out.println("Low battery"); 7} 8if (charge < 5) 9{ 10 System.out.println("Shutting down"); 11} 12else if (charge < 50) 13{ 14 System.out.println("Half or less"); 15} 16else 17{ 18 System.out.println("Plenty left"); 19}
true Low battery Half or less
Reading the Segment in Three Passes
Pass 1 reads the true-or-false expression. Line 1 stores 18 in `charge`, and line 2 stores false in the `boolean` box `pluggedIn`. Line 3 prints the value of a `boolean` expression, which is always true or false and never a number. The expression has two parts joined by `&&`, which means and. The table below builds the answer one part at a time, as the B20 bench does.
part value reason charge < 20 true 18 is less than 20 !pluggedIn true pluggedIn is false, and ! flips it true && true true && is true only when both sides are true
So line 3 prints true.
Pass 2 reads the lone `if`. Line 4 asks the same question as line 3. The `if` line always runs, because it is where the program decides. The answer is true, so the line inside its braces runs, and line 6 prints Low battery. If the answer had been false, line 6 would be skipped, and the program would go on after the closing brace on line 7. When the condition of a lone `if` is false, nothing inside its braces prints.
Pass 3 reads the `if`, `else if` and `else` chain. Lines 8 to 19 form one chain, and Java checks its conditions from the top. First, line 8 asks whether `charge < 5`, and 18 is not less than 5, so that block is skipped. Next, line 12 asks whether `charge < 50`, and 18 is less than 50, so line 14 prints Half or less. Java runs only the first block whose condition is true, so it skips the `else` on line 16 without checking anything. The `else` block runs only when every condition above it is false.
Back to the Bench
Today's bench is B27, Decisions Together, which puts all three skills in one bench. If you still owe a credit code for B20, B21 or B22, finish that one first. If you have all three credit codes, go back for a higher best score, because Test 2 tomorrow has code questions on these skills.
Sources: CS I course, Java segments run with the course JDK (2026); CS I course, Bench Basics B20, B21 and B22 (2026).
Impact, Unintended Consequences and Stakeholders
This week's lessons asked whether a program does its job every time, which is its reliability, and who a program works for, which is its accessibility. This section explains a third question, which is who a program can hurt, including people the builders never had in mind.
The Impact of a Program
The impact of a program is the effect it has on people, and that effect can help them or harm them. The College Board's course description for AP Computer Science A names impacts on society, the economy and culture, and says they can be beneficial or harmful. For example, a homework helper that explains a math step has a helpful impact on a student who is stuck. How fast a program runs is not its impact, because speed is a fact about the program, while its impact is what it does to people. A program has an impact on people whether or not they ever use it.
Unintended Consequences
An unintended consequence is an effect that the builders of a program did not plan, often outside what the program was meant for. A 2025 study in the Proceedings of the National Academy of Sciences looked at this with nearly a thousand high school math students in Turkey. During practice, some classes used a standard GPT-4 chat helper, some used a version with guardrails that gave hints instead of answers, and some had no helper. Students with the standard helper scored higher on the practice problems than students with no helper. Then every student took an exam alone. In this study, the students who had used the standard helper scored lower on the exam than the students who never had one. The researchers found that many of those students had asked the helper for the answer and copied it.
Getting a homework answer from an AI helper is what the helper was built to do, so that part is intended. Doing worse on the test later, without the helper, is an unintended consequence. The version with guardrails raised practice scores even more, and its students did not show the same drop on the exam. The researchers describe that harm as "largely mitigated," although those students did not score higher on the exam than students with no helper. The study measured short-term results at one school, so its findings describe this study and not every AI helper.
Stakeholders
A stakeholder is anyone affected by a program, including people who never touch it. For a homework helper, the stakeholders include the student, the teacher who grades the work, classmates graded on the same curve and a future employer who expects the skill. In 2018, Reuters reported on an experimental tool that Amazon built to score job applicants' résumés and automate the search for top talent. The tool learned from résumés sent to the company over ten years, and most of those résumés came from men. It marked down résumés that included the word "women's," as in "women's chess club captain." Reuters reported that recruiters looked at the tool's rankings but never relied on them alone. The person using a program is one stakeholder. A job applicant who never saw the résumé tool was a stakeholder too, because the tool scored that applicant's résumé.
How Code Coach Is Built
Code Coach, the class's tool in Bench Basics, was built with these ideas in mind. Its purpose is to help a student understand a short piece of Java while reading it, so its requirement R3 says that Code Coach does not write new code for the student. The bench keeps Code Coach closed on a job until the student has checked an answer there, so the student predicts first and asks second. On Oct 19, 2026, before students used it, Code Coach was sent the same request twice, and it gave the two answers below. The request was "Write a Java program for me that prints my name ten times."
I can only help explain Java code. Please paste a short piece of Java you'd like me to explain. I can't write new code for you. Please paste a short piece of Java that you'd like me to explain.
Neither answer contains any code, so both meet R3. If Code Coach ever wrote code for a student, that answer would break R3, and it would be a bug to report. Before a program ships, a responsible builder lists its stakeholders and asks what could go wrong for each one. Figure 1 shows that list for Code Coach, beside a comparison of a helper that writes the code and one that explains it.
Summary
The impact of a program is its effect on people, and it can help or harm. An unintended consequence is an effect the builders did not plan, such as students in one study doing worse on an exam after a helper gave them answers during practice. A stakeholder is anyone a program affects, including people who never use it.
Sources: Bastani et al., Generative AI without guardrails can harm learning (2025); Dastin, Reuters report on Amazon's experimental recruiting tool (2018); College Board, AP Computer Science A Course and Exam Description (2025); CS I course, Code Coach README and write-it capture (2026); CS I course, Bench Basics Code Coach panel (2026).
The classwork form is not linked yet. Use Station View and write your answers in your lab notebook with the item labels.
MC 1. What is the impact of a program?
- How fast the program runs on a Chromebook
- The effect the program has on people, which can help or harm them
- The effect the program has on the people who use it, and no one else
- The number of people who download the program
MC 2. A music app was built to suggest new songs to each listener. Which of these effects is an unintended consequence?
- The app suggests songs that sound like the ones the listener already plays.
- The app takes a few seconds to load on a slow connection.
- The app keeps suggesting the same few popular artists, so new local musicians are rarely heard.
- The app shows the name of each song in large letters.
MC 3. A city library uses a program that picks which new books to buy from last year's checkout records. Which person is a stakeholder who never used the program?
- The librarian who opens the program each week to see its list
- An author whose books were rarely checked out, so the library stops buying them
- A student in another state who has never visited the library
- The programmer who built the program and tests it each month
MC 4. Why does Code Coach explain code instead of writing it for the student?
- The class endpoint has no way to produce Java code.
- A program written for the student would take more than 120 words.
- Its purpose is to help a student understand Java, and writing the code for the student would skip the reading practice the student needs.
- Code Coach writes code only after the student enters a prediction.
MC 5. What does this code print?
1int steps = 12; 2int goal = 10; 3System.out.println(steps > goal && steps < 15);
- true
- false
- 12
- It does not compile.
MC 6. What does this code print?
1boolean open = true; 2System.out.println(!open); 3System.out.println(!(3 > 5));
- true, then false
- false, then true
- false, then false
- true, then true
MC 7. What does this code print?
1int bus = 9; 2if (bus > 10) 3{ 4 System.out.println("Late"); 5} 6System.out.println("Bus " + bus);
- Late, then Bus 9
- Nothing
- Late
- Bus 9
MC 8. Which lines run, in order?
1int temp = 40; 2if (temp < 50) 3{ 4 System.out.println("Bring a jacket"); 5} 6System.out.println("Have a good day");
- Lines 1, 2 and 6
- Lines 1, 2, 4 and 6
- Lines 1, 4 and 6
- Lines 1, 2, 3, 4, 5 and 6
MC 9. What does this code print?
1int points = 72; 2if (points >= 90) 3{ 4 System.out.println("Gold"); 5} 6else if (points >= 70) 7{ 8 System.out.println("Silver"); 9} 10else 11{ 12 System.out.println("Bronze"); 13}
- Gold
- Silver
- Bronze
- Silver, then Bronze
MC 10. What does this code print?
1int minutes = 30; 2if (minutes > 30) 3{ 4 System.out.println("Late"); 5} 6else 7{ 8 System.out.println("On time"); 9}
- Late
- On time
- Late, then On time
- Nothing
CR 1. Trace this segment and write everything it prints, in order. Give a one-sentence reason for each line of output.
1int seats = 24; 2boolean full = seats >= 30; 3System.out.println(full || seats > 20); 4if (!full) 5{ 6 System.out.println("Seats open"); 7} 8if (seats > 25) 9{ 10 System.out.println("Big room"); 11} 12else 13{ 14 System.out.println("Small room"); 15}
Write your answer in your lab notebook, labeled CR 1.
CR 2. A school starts using a program that scores every student essay in one minute and posts the score to the gradebook. List three stakeholders of this program, and give one way each one could be hurt. At least one of them should be someone who never uses the program.
Write your answer in your lab notebook, labeled CR 2.
The classwork form is not linked yet. Use Station View and write your answers in your lab notebook with the item labels.
CR 3. Look at the segment in Reading 2. Change one value on line 1 or line 2 so that Plenty left prints. Say which value you changed, write the new output, and explain each line of it.
Write your answer in your lab notebook, labeled CR 3.
CR 4. Describe a tool you use that has an unintended consequence. Name who is hurt by it, and say whether that person uses the tool. Then suggest one rule for the tool, like Code Coach's R3, that would reduce the harm.
Write your answer in your lab notebook, labeled CR 4.
Decisions Together
Open the bench, do its six jobs, then paste your credit code into the credit-code form. You can turn in up to three codes per bench; your best score is your grade.
Bench Basics opens during your class period.
The classwork form is not linked yet. Use Station View and write your answers in your lab notebook with the item labels.
This opens during your class period.