Staging: a draft, not the live site
Practice

Code and Tech Benches

The CS I benches. Finishing one makes a claim code, the same as in class, with a full report of every job. Each bench opens here on the day it is taught in class.

Files

B01 · Find the File

A virtual computer. Drag files onto folders, or select one and use the buttons. Every job checks itself when it is done. There are 20 jobs. Jobs 1 to 15 are the bench: all 15 right is full credit. Jobs 16 to 20 are bonus and harder: each one right adds 5 points, up to 100, and a wrong move there costs nothing.

20 jobs

B02 · Name It Right

The website files for a small bakery were saved with the wrong extensions. Click each file to see what is inside, then rename it so the extension matches. Keep the first part of each name the same. Every job checks itself. There are 20 jobs. Jobs 1 to 15 are the bench: all 15 right is full credit. Jobs 16 to 20 are bonus and harder: each one right adds 5 points, up to 100, and a wrong move there costs nothing.

20 jobs

B03 · Zip It

A file manager that shows the size of everything. Compress folders and files, extract ZIP files into the right folder, and compare the sizes before and after. There are 20 jobs. Jobs 1 to 15 are the bench: all 15 right is full credit. Jobs 16 to 20 are bonus and harder: each one right adds 5 points, up to 100, and a wrong move there costs nothing.

20 jobs

B04 · Downloads Rescue

Your Downloads folder is a mess of files for a website you are building for Pelican Sno-Balls, mixed in with your own files. Drag files onto folders, or select one and use the buttons. Every job checks itself when it is done. There are 20 jobs. Jobs 1 to 15 are the bench: all 15 right is full credit. Jobs 16 to 20 are bonus and harder: each one right adds 5 points, up to 100, and a wrong move there costs nothing.

20 jobs

B05 · Files Together

This bench puts last week's four file skills together. You are building a website for Bayou Brass, a brass band: find their files, fix bad names, sort everything into a project folder, then zip it. Click a file to see what is inside. Every job checks itself when it is done. There are 20 jobs. Jobs 1 to 15 are the bench: all 15 right is full credit. Jobs 16 to 20 are bonus and harder: each one right adds 5 points, up to 100, and a wrong move there costs nothing.

20 jobs

Before Java

B06 · Store It

Before Java: a program stores values in boxes. Each step works out the right side, then puts the result in the box on the left, replacing what was there. There are 20 jobs. Jobs 1 to 15 are the bench: all 15 right is full credit. Jobs 16 to 20 are bonus and harder: each one right adds 5 points, up to 100, and a wrong answer there costs nothing.

20 jobs

B07 · Trace Tables

Trace tables: build the header row yourself, then fill one row for each line that runs. On the longer ones you build the whole table and check it once at the end. A trace table is how you run code with your fingers instead of holding it in your head. There are 20 jobs. Jobs 1 to 15 are the bench: all 15 right is full credit. Jobs 16 to 20 are bonus and harder: each one right adds 5 points, up to 100, and a wrong answer there costs nothing.

20 jobs

B08 · Divide and Remainder

Before Java: whole-number division. 17 ÷ 5 is 3 with 2 left over, the way you learned long division. ÷ gives the whole part and rem gives what is left over. Work one step at a time: parentheses, then *, ÷ and rem left to right, then + and -. There are 20 jobs. Jobs 1 to 15 are the bench: all 15 right is full credit. Jobs 16 to 20 are bonus and harder: each one right adds 5 points, up to 100, and a wrong answer there costs nothing.

20 jobs

B09 · True or False

Before Java: a question a program asks has only two answers, true or false. A comparison such as 4 ≤ 4 answers true or false. and needs both sides true, or needs at least one side true, and not flips the answer. n rem 2 ≠ 0 asks whether n is odd. There are 20 jobs. Jobs 1 to 15 are the bench: all 15 right is full credit. Jobs 16 to 20 are bonus and harder: each one right adds 5 points, up to 100, and a wrong answer there costs nothing.

20 jobs

B10 · Before Java Together

Before Java, all together: this bench puts the week's skills in one place. A box holds one value, and the arrow replaces it. A trace table records every box after every line. ÷ keeps the whole part and rem keeps what is left over. A question is true or false. There are 20 jobs. Jobs 1 to 15 are the bench: all 15 right is full credit. Jobs 16 to 20 are bonus and harder: each one right adds 5 points, up to 100, and a wrong answer there costs nothing.

20 jobs

First Java

B11 · The Shape

Your first real Java. Every Java program has the same shape: a class, a method named main inside it, and statements inside main. Braces { } mark where each part starts and stops, and a semicolon ends each statement. There are 20 jobs. Jobs 1 to 15 are the bench: all 15 right is full credit. Jobs 16 to 20 are bonus and harder: each one right adds 5 points, up to 100, and a wrong answer there costs nothing.

Opens Mon, Nov 2

B12 · Start to Stop

Where does a program start, which line runs next, and where does it stop? Java starts at main, runs one statement at a time from top to bottom, and stops when main's last statement is done. Click the lines in the order they run. There are 20 jobs. Jobs 1 to 15 are the bench: all 15 right is full credit. Jobs 16 to 20 are bonus and harder: each one right adds 5 points, up to 100, and a wrong answer there costs nothing.

Opens Tue, Nov 3

B13 · Print It

System.out.println prints its text and then moves to a new line. System.out.print prints its text and stays on the same line. Text in quotes prints exactly as written. Predict exactly what prints, line by line. There are 20 jobs. Jobs 1 to 15 are the bench: all 15 right is full credit. Jobs 16 to 20 are bonus and harder: each one right adds 5 points, up to 100, and a wrong answer there costs nothing.

Opens Wed, Nov 4

B14 · Java Symbols

Java uses symbols that most writing never does: braces, semicolons, quotes, = and ==, and + that adds or joins. The compiler checks every one of them, and one wrong character stops the whole program. Type each line exactly, name each symbol's job, and predict what prints. There are 20 jobs. Jobs 1 to 15 are the bench: all 15 right is full credit. Jobs 16 to 20 are bonus and harder: each one right adds 5 points, up to 100, and a wrong answer there costs nothing.

Opens Thu, Nov 5

B31 · First Java Together

First Java Together: week 14 in one bench. Find where a program starts, follow its statements in order, predict exactly what the screen shows, spot the symbol that stops a program, and find a bug by comparing what a program should print with what it printed. There are 20 jobs. Jobs 1 to 15 are the bench: all 15 right is full credit. Jobs 16 to 20 are bonus and harder: each one right adds 5 points, up to 100, and a wrong answer there costs nothing.

Opens Fri, Nov 6

Values

B15 · Boxes and Types

In Java every box has a type, and the type decides what fits. int holds whole numbers, double holds numbers with a decimal point, boolean holds true or false, and String holds text in quotes. Trace the boxes, predict what prints and find the lines that do not compile. There are 20 jobs. Jobs 1 to 15 are the bench: all 15 right is full credit. Jobs 16 to 20 are bonus and harder: each one right adds 5 points, up to 100, and a wrong answer there costs nothing.

Opens Mon, Nov 9

B16 · Trace It

Trace tables on real Java. Each assignment works out the right side with the values the boxes hold now, then stores the result in the box on the left, replacing the old value. A box keeps its last value until a line stores a new one. There are 20 jobs. Jobs 1 to 15 are the bench: all 15 right is full credit. Jobs 16 to 20 are bonus and harder: each one right adds 5 points, up to 100, and a wrong answer there costs nothing.

Opens Tue, Nov 10

B17 · Java Math

Java math. Dividing two ints keeps only the whole part, and % gives the remainder, the way B08 did with ÷ and rem. If either number is a double, the answer is a double. * / and % go before + and -, left to right, and parentheses go first. += adds to a box, -= subtracts, *= multiplies and ++ adds 1. There are 20 jobs. Jobs 1 to 15 are the bench: all 15 right is full credit. Jobs 16 to 20 are bonus and harder: each one right adds 5 points, up to 100, and a wrong answer there costs nothing.

Opens Wed, Nov 11

B18 · Join the Strings

+ does two jobs in Java. Between two numbers it adds. When either side is a String, it joins them into one String. Java works left to right, and parentheses are worked first. length() counts the characters in a String, spaces included. The Reference button opens a Java Quick Reference panel: the methods on the sheet you get on the AP exam, explained in plain words, with a link to the official sheet. There are 20 jobs. Jobs 1 to 15 are the bench: all 15 right is full credit. Jobs 16 to 20 are bonus and harder: each one right adds 5 points, up to 100, and a wrong answer there costs nothing.

Opens Thu, Nov 12

B32 · Values Together

Values Together: last week's four skills on one bench. Pick the type a value needs, trace typed boxes, work Java math with int and double, and read + as add or join. Two jobs ask you to check another student's code and score it the way free-response answers are scored. There are 20 jobs. Jobs 1 to 15 are the bench: all 15 right is full credit. Jobs 16 to 20 are bonus and harder: each one right adds 5 points, up to 100, and a wrong answer there costs nothing.

Opens Mon, Nov 16

Methods

B19 · Into a Method and Back

A method call is a jump. When main calls a method, the program goes into that method, runs its lines, and then comes back to the line after the call. The values a call hands over are its arguments, and they land in the method's parameters. Two jobs ask you to score another student's code. There are 20 jobs. Jobs 1 to 15 are the bench: all 15 right is full credit. Jobs 16 to 20 are bonus and harder: each one right adds 5 points, up to 100, and a wrong answer there costs nothing.

Opens Tue, Nov 17

B20 · Bring a Value Back

Some methods send a value back. return ends the method and hands its value to the line that called it, where the value takes the call's place. Returning a value is not printing it. Two jobs ask you to score a student's code against a rubric. After you check an answer, you can ask Code Coach about a line. There are 20 jobs. Jobs 1 to 15 are the bench: all 15 right is full credit. Jobs 16 to 20 are bonus and harder: each one right adds 5 points, up to 100, and a wrong answer there costs nothing.

Opens Wed, Nov 18

B21 · Read the Signature

A method's first line is its header. It says what type the method returns, its name, and its parameters: the boxes that receive the values a call sends. The name and the parameter types together are the method's signature. The values in a call are the arguments, and they must match the parameters in type and order. There are 20 jobs. Jobs 1 to 15 are the bench: all 15 right is full credit. Jobs 16 to 20 are bonus and harder: each one right adds 5 points, up to 100, and a wrong answer there costs nothing. Two jobs ask you to check a student's code against a scoring guide.

Opens Thu, Nov 19

B22 · Methods Together

This bench puts the week's three method skills together: reading a method's header, following a call into a method and back, and keeping the value a method returns. Then you score other students' methods the way AP Readers do, one rubric point at a time. A void method's call stands alone. A returned value takes the call's place. After you check an answer, you can ask Code Coach about a line. There are 20 jobs. Jobs 1 to 15 are the bench: all 15 right is full credit. Jobs 16 to 20 are bonus and harder: each one right adds 5 points, up to 100, and a wrong answer there costs nothing.

Opens Fri, Nov 20

Decisions

B23 · Java True or False

B09 in Java. A boolean box holds true or false. == asks whether two values are equal and != asks whether they differ. && is and, || is or, ! is not. = still means store. Watch the edge: > leaves it out, >= lets it in. Two jobs ask you to score a student's code against a rubric. After you check an answer, you can ask Code Coach about a line. There are 20 jobs. Jobs 1 to 15 are the bench: all 15 right is full credit. Jobs 16 to 20 are bonus and harder: each one right adds 5 points, up to 100, and a wrong answer there costs nothing.

Opens Mon, Nov 30

B24 · If It Is True

An if statement asks a true-or-false question. When the answer is true, the lines inside its braces run. When it is false, they are skipped, and the program goes on after the closing brace. The if line itself always runs: it is where the program decides. Two jobs ask you to check another student's code and score it the way free-response answers are scored. There are 20 jobs. Jobs 1 to 15 are the bench: all 15 right is full credit. Jobs 16 to 20 are bonus and harder: each one right adds 5 points, up to 100, and a wrong answer there costs nothing.

Opens Tue, Dec 1

B25 · Otherwise

else gives an if a second path: when the condition is false, the else block runs instead. else if adds another question. Java checks the conditions from the top and runs only the first block whose condition is true, so the order of the checks matters. Two jobs ask you to score a student's code against a rubric. After you check an answer, you can ask Code Coach about a line. There are 20 jobs. Jobs 1 to 15 are the bench: all 15 right is full credit. Jobs 16 to 20 are bonus and harder: each one right adds 5 points, up to 100, and a wrong answer there costs nothing.

Opens Wed, Dec 2

B26 · Decisions Together

Decisions Together: last week's three decision skills on one bench. A boolean box can feed an if, && and || join two questions into one, and an if / else if / else chain runs exactly one of its branches. Today you also test a chain the way a tester does: a test case for every branch, and the boundary value where a wrong sign shows. Two jobs ask you to check another student's code and score it the way free-response answers are scored. There are 20 jobs. Jobs 1 to 15 are the bench: all 15 right is full credit. Jobs 16 to 20 are bonus and harder: each one right adds 5 points, up to 100, and a wrong answer there costs nothing.

Opens Thu, Dec 3

The exam

B27 · Look It Up

The AP exam gives you the Java Quick Reference. You do not memorize these methods: you look them up. Open the Reference, find the method, read its return type and what it returns, then predict. Two jobs ask you to check another student's code and score it the way free-response answers are scored. There are 20 jobs. Jobs 1 to 15 are the bench: all 15 right is full credit. Jobs 16 to 20 are bonus and harder: each one right adds 5 points, up to 100, and a wrong answer there costs nothing.

Opens Mon, Dec 7

B28 · Inside a String

Java counts the characters of a String from 0, so the last index is the length minus 1. substring(from, to) takes from index from and stops before index to; substring(from) goes to the end. indexOf gives the first position of some text, or -1. Two jobs ask you to score a student's code against a rubric. These are AP-style items. There are 20 jobs. Jobs 1 to 15 are the bench: all 15 right is full credit. Jobs 16 to 20 are bonus and harder: each one right adds 5 points, up to 100, and a wrong answer there costs nothing.

Opens Tue, Dec 8

B29 · Check the Coach

Check the Coach. Most jobs show Code Coach's real answers, saved from the class endpoint in October, and one shows a program a model wrote. Predict first, then decide whether the answer was right by comparing it with what Java really prints. A model generates its answers, so a wrong one can sound as sure as a right one. Three jobs ask you to score code with a rubric. There are 20 jobs. Jobs 1 to 15 are the bench: all 15 right is full credit. Jobs 16 to 20 are bonus and harder: each one right adds 5 points, up to 100, and a wrong answer there costs nothing.

Opens Wed, Dec 9

B30 · Read It Like the Exam

Read It Like the Exam. Every job here is one the AP exam could ask: consider the code, follow the lines in the order Java runs them, and say what happens. Each job mixes skills from earlier benches: methods, return values, if and else, Strings and Math. Use the Reference button for String and Math, as you will on the exam. Two jobs ask you to check another student's code and score it the way free-response answers are scored. There are 20 jobs. Jobs 1 to 15 are the bench: all 15 right is full credit. Jobs 16 to 20 are bonus and harder: each one right adds 5 points, up to 100, and a wrong answer there costs nothing.

Opens Thu, Dec 10

B33 · The Exam Together

The Exam Together: week 18's four skills on one bench. Look a method up in the Quick Reference, find positions inside a String counting from 0, check what Code Coach claims, and read code the way the exam asks. Three jobs ask you to score another student's code the way free-response answers are scored. There are 20 jobs. Jobs 1 to 15 are the bench: all 15 right is full credit. Jobs 16 to 20 are bonus and harder: each one right adds 5 points, up to 100, and a wrong answer there costs nothing.

Opens Fri, Dec 11

B34 · Semester Together

Semester Together: a tour of the whole fall, one bench before the final. True or false and trace tables, what the screen shows, types, math and strings, methods and decisions, and Zeller's 1886 day-of-the-week formula from today's reading. Three jobs ask you to check another student's code and score it the way free-response answers are scored. There are 20 jobs. Jobs 1 to 15 are the bench: all 15 right is full credit. Jobs 16 to 20 are bonus and harder: each one right adds 5 points, up to 100, and a wrong answer there costs nothing.

Opens Mon, Dec 14