How to use this unit
Your website is the map. CodeHS and AP Classroom are resource libraries; the workbook records your thinking. Follow this loop for every lesson.
The same routine every time
- Open the website lesson and read the worked model.
- Watch the selected CodeHS/AP Daily videos.
- Record STRIDES vocabulary and notes.
- Predict, illustrate, write pseudocode and trace.
- Code in CodeHS, test, debug and reflect.
If the two platforms use a different order
Do not work straight through a CodeHS module just because it appears next. Use the specific activities listed in this website lesson or assigned by your teacher. AP Daily topics are listed by official number.
Do not start the complete AP Unit 1 progress check yet: object creation and instance methods are taught in our later Unit 3.
STRIDES: turn examples into lasting notes
Each letter has a programming purpose. Your notes should include a rule, a visual model and a worked example — not just a copied definition.
A modeled note: variable update
int laps = 3;
laps = laps + 1;Rule: evaluate the right side first. Steps: choose type → declare → assign → trace.
Good reflection vs. weak reflection
Weak: “I finished the activity.”
Strong: “I thought 7/2 would print 3.5. When it printed 3, I realized both values were integers. I changed one operand to 2.0 and retested.”
Write what you predicted, observed, changed and learned.
INPUT distance, speed ← distance/time, DISPLAY speed. It is not expected to use exact Java syntax. The next stage is converting the plan to code.Eight-lesson assignment roadmap
Follow our lesson numbers even when the referenced CodeHS topics appear in other parts of the platform.
| Our lesson | Website topic | Selected CodeHS activities | AP Classroom topics | Workbook |
|---|---|---|---|---|
| 1.1 | Algorithms & First Java Program | 1.1.1 Introduction to Algorithms; 1.1.3 Basic Java Program Structure; 1.1.7 Welcome Program; 1.1.10 Debugging: Quotes | 1.1 | 9–11 |
| 1.2 | Variables & Data Types | 1.2.1–1.2.2 Variables and Primitive Data Types; 1.2.11 Variables About You | 1.2 | 12–14 |
| 1.3 | Expressions & Output | 1.3.7 Arithmetic Expressions; 1.3.9 Tricky Integer Division; 1.3.13 Exploration: Temperature Conversion | 1.3 | 15–17 |
| 1.4 | Assignment, Input & Updates | 1.4.1 Assignment Statements; 1.4.6 User Input; 1.6.5 Basketball Stats Simplification | 1.4, 1.6 | 18–20 |
| 1.5 | Casting & Numerical Precision | 1.5.2 Casting Example; 1.5.3 Casting Order of Operations; 1.5.8 Range of Variables; 1.5.9 Integer Overflow | 1.5 | 21–23 |
| 1.6 | Strings & Combining Data | 1.2.7 Reference Data Types and Strings; 1.15.1 String Concatenation; 1.15.3 Concatenating Primitives | 1.2, intro 1.15 | 24–26 |
| 1.7 | Libraries, Methods & Documentation | 1.7.5 Navigating an API; 1.8.4 Bank Account Comments; 1.9.1 Method Signatures; 1.10.2 Basic Calculator; 1.11.3 Exploring the Math Class API | 1.7–1.11 | 27–30 |
| 1.8 | Vertical Motion Calculator | 1.4.5 Freely Falling Bodies (supporting activity); website Vertical Motion Calculator project | Application: 1.1–1.11 | 31–34 |
Student progress
0 of 8 lessons marked complete on this browser.
Algorithms & First Java Program
Learning target: Represent an algorithm as ordered steps; explain how Java source is compiled and executed; identify syntax and logic errors.
Follow your assigned resources
1. Website: Read this lesson and study the worked model. 2. CodeHS Cortado: 1.1.1 Introduction to Algorithms; 1.1.3 Basic Java Program Structure; 1.1.7 Welcome Program; 1.1.10 Debugging: Quotes.
3. AP Classroom: Topic(s) 1.1; watch the AP Daily video(s) your teacher assigns. 4. Workbook: complete pages 9–11 before the reflection.
Understand the idea
A program is a sequence of exact instructions. Java source is checked and translated by a compiler before it runs on the Java Virtual Machine.
public class Main {
public static void main(String[] args) {
System.out.println("Start");
System.out.println("Ready");
}
}Illustrate / model
Thinking before coding
Vocabulary for your STRIDES notes:
Pseudocode model
Practice questions
What happens if the two println statements are reversed?
The output order is reversed: Ready, then Start.
Why does missing a quotation mark stop compilation?
It violates Java syntax, so the compiler rejects the source code.
Variables & Data Types
Learning target: Choose types; declare and initialize variables; visualize stored values; predict updates.
Follow your assigned resources
1. Website: Read this lesson and study the worked model. 2. CodeHS Cortado: 1.2.1–1.2.2 Variables and Primitive Data Types; 1.2.11 Variables About You.
3. AP Classroom: Topic(s) 1.2; watch the AP Daily video(s) your teacher assigns. 4. Workbook: complete pages 12–14 before the reflection.
Understand the idea
Primitive variables store a value. A String is a reference type. Each assignment evaluates the right side and stores the result in the variable on the left.
int laps = 3;
double pace = 6.5;
String runner = "Maya";
laps = laps + 1;
System.out.println(laps);Illustrate / model
Each assignment replaces the value stored in the named location.
Thinking before coding
Vocabulary for your STRIDES notes:
Pseudocode model
Practice questions
Which data type represents elapsed seconds measured to tenths?
double, because the value may have a fractional part.
If int a=4; int b=a; b=7;, what is a?
4: primitive variables have separate stored values.
Expressions & Output
Learning target: Evaluate arithmetic and output expressions; distinguish integer division, modulus, and decimal division.
Follow your assigned resources
1. Website: Read this lesson and study the worked model. 2. CodeHS Cortado: 1.3.7 Arithmetic Expressions; 1.3.9 Tricky Integer Division; 1.3.13 Exploration: Temperature Conversion.
3. AP Classroom: Topic(s) 1.3; watch the AP Daily video(s) your teacher assigns. 4. Workbook: complete pages 15–17 before the reflection.
Understand the idea
Operator precedence and operand types determine results. int/int produces an integer quotient, while % produces the remainder.
System.out.println(2 + 3 * 4);
System.out.println(17 / 5);
System.out.println(17 % 5);
System.out.println(17 / 5.0);Illustrate / model
Thinking before coding
Vocabulary for your STRIDES notes:
Pseudocode model
Practice questions
What is 29 % 6?
5, since 29 = 6×4 + 5.
What expression gets the decimal result of 7 divided by 2?
7.0 / 2 or (double) 7 / 2 gives 3.5.
Assignment, Input & Updates
Learning target: Trace assignments and compound assignments; read values with Scanner; model input, process and output.
Follow your assigned resources
1. Website: Read this lesson and study the worked model. 2. CodeHS Cortado: 1.4.1 Assignment Statements; 1.4.6 User Input; 1.6.5 Basketball Stats Simplification.
3. AP Classroom: Topic(s) 1.4, 1.6; watch the AP Daily video(s) your teacher assigns. 4. Workbook: complete pages 18–20 before the reflection.
Understand the idea
A variable update changes stored state. Scanner lets a program accept input; operators such as += and *= are concise update forms.
int score = 90;
score += 5;
score *= 2;
score--;
System.out.println(score);Illustrate / model
Thinking before coding
Vocabulary for your STRIDES notes:
Pseudocode model
Practice questions
What prints if the update order is reversed (multiply, then add, then subtract)?
184, because 90×2+5−1 = 184.
What does total += 5 mean?
total = total + 5, using the previous total value.
Casting & Numerical Precision
Learning target: Predict conversions, truncation, integer overflow and finite precision.
Follow your assigned resources
1. Website: Read this lesson and study the worked model. 2. CodeHS Cortado: 1.5.2 Casting Example; 1.5.3 Casting Order of Operations; 1.5.8 Range of Variables; 1.5.9 Integer Overflow.
3. AP Classroom: Topic(s) 1.5; watch the AP Daily video(s) your teacher assigns. 4. Workbook: complete pages 21–23 before the reflection.
Understand the idea
Casting changes how expressions are evaluated. When integer division happens before an assignment to double, fractional information is already lost.
int correct = 17;
int total = 20;
double wrong = correct / total;
double right = (double) correct / total;
System.out.println(wrong);
System.out.println(right);Illustrate / model
Thinking before coding
Vocabulary for your STRIDES notes:
Pseudocode model
Practice questions
What is (int) -3.9?
-3: casting to int truncates toward zero.
Why is double pct = correct/total not enough?
The int division runs first and discards the fraction.
Strings & Combining Data
Learning target: Distinguish Strings from primitive values; trace concatenation and format meaningful outputs.
Follow your assigned resources
1. Website: Read this lesson and study the worked model. 2. CodeHS Cortado: 1.2.7 Reference Data Types and Strings; 1.15.1 String Concatenation; 1.15.3 Concatenating Primitives.
3. AP Classroom: Topic(s) 1.2, intro 1.15; watch the AP Daily video(s) your teacher assigns. 4. Workbook: complete pages 24–26 before the reflection.
Understand the idea
The + operator adds numeric operands but concatenates when String text is involved. Parentheses control when arithmetic occurs.
System.out.println(2 + 3 + " meters");
System.out.println("meters: " + 2 + 3);
System.out.println("meters: " + (2 + 3));Illustrate / model
Thinking before coding
Vocabulary for your STRIDES notes:
Pseudocode model
Practice questions
What prints for "A" + 1 + 2?
A12, because left-to-right concatenation begins with a String.
How can you make "Total: " + 2 + 3 print Total: 5?
Use "Total: " + (2 + 3).
Libraries, Methods & Documentation
Learning target: Use API documentation, identify method signatures and return values, call Math class methods and write useful comments.
Follow your assigned resources
1. Website: Read this lesson and study the worked model. 2. CodeHS Cortado: 1.7.5 Navigating an API; 1.8.4 Bank Account Comments; 1.9.1 Method Signatures; 1.10.2 Basic Calculator; 1.11.3 Exploring the Math Class API.
3. AP Classroom: Topic(s) 1.7–1.11; watch the AP Daily video(s) your teacher assigns. 4. Workbook: complete pages 27–30 before the reflection.
Open 0538 · Open 4669 · Open 4670 · Open 4671 · Open 4672 · Open AP Classroom
Understand the idea
A method accepts arguments through parameters and may return a value. API documentation describes its purpose, inputs and return type.
double root = Math.sqrt(49.0);
double cube = Math.pow(2.0, 3.0);
System.out.println(root);
System.out.println(cube);Illustrate / model
Thinking before coding
Vocabulary for your STRIDES notes:
Pseudocode model
Practice questions
What type does Math.sqrt return?
double, even when the square root is mathematically a whole number.
Why is a comment like // gravity is positive here useful?
It describes an assumption that may be unclear from the formula alone.
Vertical Motion Calculator
Learning target: Design, implement and test a vertical-motion calculator with pseudocode, a flowchart and a prediction table.
Follow your assigned resources
1. Website: Read this lesson and study the worked model. 2. CodeHS Cortado: 1.4.5 Freely Falling Bodies (supporting activity); website Vertical Motion Calculator project.
3. AP Classroom: Topic(s) Application: 1.1–1.11; watch the AP Daily video(s) your teacher assigns. 4. Workbook: complete pages 31–34 before the reflection.
Understand the idea
Use vertical displacement y = v₀t − 0.5gt². Initial upward velocity is positive; g is the positive magnitude of downward acceleration (usually 9.8 m/s²).
double v0 = 20.0;
double t = 2.0;
double g = 9.8;
double y = v0*t - 0.5*g*t*t;
System.out.println("Displacement: " + y + " m");Illustrate / model
Thinking before coding
Vocabulary for your STRIDES notes:
Pseudocode model
Practice questions
What is y for v0=20, t=1, g=9.8?
15.1 meters.
What does a negative displacement mean?
The object is below its starting position (not necessarily below ground).
Step through Java variable updates
Predict how each statement changes the stored value. Advance one statement at a time, then reset.
int score = 90;
score += 5;
score *= 2;
score--;Current statement: Before initialization
Predict 90, 95, 190, 189 before advancing.
Vertical Motion Calculator — Prediction Studio
Predict vertical displacement before checking the model. Adjust the launch conditions and compare the numeric result with the trajectory diagram. This tool illustrates the formula; your actual Java program belongs in CodeHS or your assigned IDE.
20.40 m
Make a prediction, then compare against the model.
| v₀ (m/s) | t (s) | g (m/s²) | y (m) |
|---|---|---|---|
| 20.0 | 0 | 9.8 | 0.00 |
| 20.0 | 1 | 9.8 | 15.10 |
| 20.0 | 2 | 9.8 | 20.40 |
| 20.0 | 3 | 9.8 | 15.90 |
Review, reference and submit
Practice these problems without opening the solution first. The workbook contains space for your full written reasoning and a one-page personal reference sheet.
Trace and explain
int n = 13; int r = n % 5; n += 3;
What are n and r at the end?
n = 16 and r = 3. r was calculated before n changed.
System.out.println("Lap " + (2+3));
Predict the output
Lap 5
Debug and model
Why is double fraction = 3 / 8; not the intended decimal result?
Check reasoning
3/8 is integer division (0), then assigned as 0.0. Use 3.0/8 or (double)3/8.
Draw an algorithm for converting a race time in minutes and seconds to seconds per 400 meters.
See a model
Input minutes and seconds → total = 60×min + sec → pace400 = total/4.0 → display pace.
↓ Download the student workbook Next: Unit 2 — Control Structures →
Unit 1 Student Workbook
Use the student workbook alongside the lessons, practice questions, and unit project.
Download the student workbook (PDF) Open workbook in a new tab