Please enable JavaScript to use CodeHS

Outline


1. Introduction to Programming in Java with Karel the Dog
1.1 Introduction to Programming With Karel
Video 1.1.1 Introduction to Programming With Karel
Quiz 1.1.2 Karel Commands
Example 1.1.3 Our First Karel Program
Exercise 1.1.4 Your First Karel Program
Exercise 1.1.5 Short Stack
1.2 More Basic Karel
Video 1.2.1 More Basic Karel
Quiz 1.2.2 More Basic Karel
Example 1.2.3 Tennis Ball Square
Exercise 1.2.4 Make a Tower
Exercise 1.2.5 Pyramid of Karel
1.3 Java Programs and the Run Method
Video 1.3.1 Writing a Java Program
Quiz 1.3.2 Run Method
Example 1.3.3 Square Karel
Exercise 1.3.4 Tower Karel
Exercise 1.3.5 Gold Medal Karel
Exercise 1.3.6 Maze Karel
1.4 Karel Can't Turn Right
Video 1.4.1 Karel Can't Turn Right
Quiz 1.4.2 Karel Can't Turn Right
Example 1.4.3 Tower and Turn Right
Exercise 1.4.4 Slide Karel
Exercise 1.4.5 Fireman Karel
1.5 Methods in Karel
Video 1.5.1 Methods in Karel
Quiz 1.5.2 Methods in Karel
Example 1.5.3 Turn Around
Exercise 1.5.4 Pancakes
Exercise 1.5.5 Mario Karel
1.6 Top Down Design and Decomposition in Karel
Video 1.6.1 Top Down Design and Decomposition in Karel
Quiz 1.6.2 Top Down Design and Decomposition
Example 1.6.3 Hurdle Karel
Exercise 1.6.4 The Two Towers
1.7 Commenting Your Code
Video 1.7.1 Commenting Your Code
Quiz 1.7.2 Commenting Your Code
Example 1.7.3 Hurdle Karel (Comments)
Exercise 1.7.4 The Two Towers + Comments
1.8 Super Karel
Video 1.8.1 Super Karel
Quiz 1.8.2 Super Karel
Example 1.8.3 Hurdle Karel (with SuperKarel)
Exercise 1.8.4 The Two Towers + SuperKarel
1.9 For Loops
Video 1.9.1 For Loops
Quiz 1.9.2 For Loops
Example 1.9.3 Repeated Move
Example 1.9.4 Put Down Tennis Balls
Exercise 1.9.5 Marathon Karel
Exercise 1.9.6 Take 'em All
Exercise 1.9.7 Dizzy Karel
Exercise 1.9.8 For Loop Square
Exercise 1.9.9 Lots of Hurdles
1.10 While Loops in Karel
Video 1.10.1 While Loops in Karel
Quiz 1.10.2 While Loops in Karel
Example 1.10.3 Move to Wall
Exercise 1.10.4 Follow The Yellow Ball Road
Exercise 1.10.5 Just Keep Spinning
Exercise 1.10.6 Lay Row of Tennis Balls
Exercise 1.10.7 Big Tower
1.11 If Statements
Video 1.11.1 If Statements
Quiz 1.11.2 If Statements Quiz
Example 1.11.3 If Statements
Example 1.11.4 Safe Take Ball
Exercise 1.11.5 Is There a Ball?
1.12 If/Else Statements
Video 1.12.1 If/Else Statements
Quiz 1.12.2 If/Else Statements
Example 1.12.3 Flip Karel
Exercise 1.12.4 Right Side Up
1.13 Control Structures Example
Video 1.13.1 Control Structures Example
Quiz 1.13.2 Control Structures Example
Example 1.13.3 Cleanup Karel
Exercise 1.13.4 Random Hurdles
1.14 More Karel Examples and Testing
Video 1.14.1 More Karel Examples and Testing
Example 1.14.2 Move Tennis Ball Stack
Example 1.14.3 Climbing Karel
1.15 How to Indent Your Code
Video 1.15.1 How to Indent Your Code
Quiz 1.15.2 How to Indent Your Code
Example 1.15.3 Dance and Clean Karel
Exercise 1.15.4 Diagonal
Exercise 1.15.5 Staircase
Badge 1.15.6 Karel Exercises Badge
1.16 Karel Challenges
Challenge 1.16.1 Fetch
Challenge 1.16.2 Racing Karel
Challenge 1.16.3 Tower Builder
Challenge 1.16.4 Super Cleanup Karel
Challenge 1.16.5 Double Tennis Balls
Challenge 1.16.6 Midpoint Karel
Badge 1.16.7 Karel Challenges Badge
1.17 Unit 1 Quiz
Quiz 1.17.1 AP Java Unit 1
2. Basic Java
2.1 Printing in Java
Video 2.1.1 Printing in Java
Quiz 2.1.2 Printing in Java
Example 2.1.3 Hello world
Example 2.1.4 Printing Multiple Lines
Exercise 2.1.5 Welcome Program
Exercise 2.1.6 ASCII Art
2.2 Variables and Types
Video 2.2.1 Variables and Types
Quiz 2.2.2 Variables and Types
Example 2.2.3 Variables
Exercise 2.2.4 Our First Integer
Exercise 2.2.5 Answering Questions
2.3 User Input
Video 2.3.1 User Input
Quiz 2.3.2 User Input
Example 2.3.3 UserInput
Exercise 2.3.4 About You
Exercise 2.3.5 Poetry
2.4 Arithmetic Expressions
Video 2.4.1 Arithmetic Expressions
Quiz 2.4.2 Arithmetic Expressions
Example 2.4.3 Calculator
Example 2.4.4 Tricky Java
Exercise 2.4.5 Area of a Rectangle
Exercise 2.4.6 Add Fractions
2.5 Casting
Video 2.5.1 Casting
Quiz 2.5.2 Casting
Example 2.5.3 Casting
Exercise 2.5.4 Casting to an Int
Exercise 2.5.5 Casting to a Double
Example 2.5.6 Casting Order of Operations
Example 2.5.7 Rounding using Casting
Exercise 2.5.8 Movie Ratings
2.6 Booleans
Video 2.6.1 Booleans
Quiz 2.6.2 Booleans
Example 2.6.3 Boolean Example
Exercise 2.6.4 Ice Cream
2.7 Logical Operators
Video 2.7.1 Logical Operators
Quiz 2.7.2 Logical Operators
Example 2.7.3 Light Switch
Exercise 2.7.4 Roller Coaster
2.8 Comparison Operators
Video 2.8.1 Comparison Operators
Quiz 2.8.2 Comparison Operators
Example 2.8.3 Grade Range
Exercise 2.8.4 Triple Double
2.9 For Loops
Video 2.9.1 For Loops
Quiz 2.9.2 For Loops
Example 2.9.3 The For Loop
Exercise 2.9.4 Repeat 1000 Times
Video 2.9.5 General For Loop
Example 2.9.6 Countdown
Example 2.9.7 Count By Twos
Exercise 2.9.8 Print The Odds
Video 2.9.9 For Loop Examples
Example 2.9.10 For Loop Sum
Exercise 2.9.11 Factorial
2.10 While Loops
Video 2.10.1 While Loops
Quiz 2.10.2 While Loops
Example 2.10.3 While Loop Countdown
Exercise 2.10.4 Even Numbers - While Loop
2.11 If Statements
Video 2.11.1 If Statements
Quiz 2.11.2 If Statements
Example 2.11.3 Negative Numbers
Example 2.11.4 Even and Odd
Exercise 2.11.5 Find the Minimum
2.12 Loop-and-a-Half
Video 2.12.1 Loop-and-a-Half
Quiz 2.12.2 Loop-and-a-Half Quiz
Example 2.12.3 Running Average
Exercise 2.12.4 Guess the Number
2.13 Short-Circuit Evaluation
Video 2.13.1 Short-Circuit Evaluation
Quiz 2.13.2 Short-Circuit Evaluation Quiz
Example 2.13.3 Pizza Slices
Exercise 2.13.4 Divisibility
2.14 De Morgan's Laws
Video 2.14.1 De Morgan's Laws
Quiz 2.14.2 De Morgan's Laws Quiz
Example 2.14.3 De Morgan AND
Example 2.14.4 De Morgan OR
Exercise 2.14.5 Amusement Park
2.15 Strings
Video 2.15.1 Strings
Quiz 2.15.2 Strings
Example 2.15.3 Comparing Strings
Exercise 2.15.4 Three Strings
Badge 2.15.5 Basic Java Exercises Badge
2.16 Unit 2 Quiz
Quiz 2.16.1 Basic Java
3. Methods
3.1 Java Methods
Video 3.1.1 Java Methods
Quiz 3.1.2 Java Methods
Example 3.1.3 Print Line Break
Exercise 3.1.4 Print Java
3.2 Methods and Parameters
Video 3.2.1 Methods and Parameters
Quiz 3.2.2 Methods and Parameters
Example 3.2.3 Line Breaks with Parameters
Example 3.2.4 Sum
Exercise 3.2.5 Multiply
Exercise 3.2.6 Add10
Exercise 3.2.7 Countdown From
Exercise 3.2.8 Echo
3.3 Methods and Return Values
Video 3.3.1 Methods and Return Values
Quiz 3.3.2 Return Value
Example 3.3.3 Methods and Return Values
Practice 3.3.4 Double Number
Practice 3.3.5 Square
Practice 3.3.6 Average
3.4 Javadocs and More Methods
Video 3.4.1 Javadocs
Quiz 3.4.2 Javadocs
Example 3.4.3 Javadoc Sum
Practice 3.4.4 Is in Range
Practice 3.4.5 Sum Range
Practice 3.4.6 Is Divisible
Practice 3.4.7 Fahrenheit to Celsius
3.5 Strings Methods
Video 3.5.1 String Methods
Example 3.5.2 Looping Over a String
Practice 3.5.3 Yelling
Practice 3.5.4 Porky Pig
Practice 3.5.5 Triple String
Practice 3.5.6 Full Name
Practice 3.5.7 First and Last
Practice 3.5.8 Repeating String
3.6 Strings and Characters
Video 3.6.1 Strings and Characters
Example 3.6.2 Chars are Numbers
Example 3.6.3 Escape Sequences
Example 3.6.4 Character Methods
Practice 3.6.5 Is it an Integer?
3.7 Exceptions
Video 3.7.1 Exceptions
Quiz 3.7.2 Exceptions Quiz
Example 3.7.3 Arithmetic Exception
Example 3.7.4 Index Out Of Bounds Exception
Exercise 3.7.5 Bug Hunter
3.8 String Processing
Video 3.8.1 String Processing
Example 3.8.2 Finding Palindromes
Example 3.8.3 String Concatenation
Practice 3.8.4 Fix the Sum String
Practice 3.8.5 Convert To Uppercase
Practice 3.8.6 Double Vowels
Practice 3.8.7 All Same Letter
Practice 3.8.8 AltCase
Practice 3.8.9 Do the Brackets Match?
Practice 3.8.10 Teen Talk
Practice 3.8.11 Password Checker
Practice 3.8.12 Replace Letter
Badge 3.8.13 Methods Exercises Badge
3.9 Unit 3 Quiz
Quiz 3.9.1 AP Java Unit 3
4. Classes and Object-Oriented Programming
4.1 Introduction to Classes and Objects
Video 4.1.1 What is a Class?
Quiz 4.1.2 Quiz: Classes and Objects
Example 4.1.3 The Rectangle Class
Example 4.1.4 The Point Class
Example 4.1.5 The Student Class
Exercise 4.1.6 Using the Rectangle Class
Exercise 4.1.7 Calling A Method
Exercise 4.1.8 Using the Point Class
Exercise 4.1.9 Using the Student Class
4.2 Classes vs. Objects
Video 4.2.1 Classes and Objects
Quiz 4.2.2 Classes vs. Objects vs. Instances
Example 4.2.3 Classes, Objects, and Instances
Example 4.2.4 Creating Rectangle Objects
Exercise 4.2.5 Text Messages
4.3 Using a Class as a Client
Video 4.3.1 How to Use a Class
Quiz 4.3.2 Quiz: Client of a Class
Example 4.3.3 Using the Rectangle Class as a Client
Example 4.3.4 Using the Randomizer Class as a Client
Exercise 4.3.5 Coin Flips
Exercise 4.3.6 Longest Streak
Example 4.3.7 Testing the GeoLocation Class
Exercise 4.3.8 How Far Away is ...?
4.4 Writing Classes
Video 4.4.1 Constructors
Quiz 4.4.2 Quiz: Constructors
Example 4.4.3 Student Constructor
Example 4.4.4 Rectangle Constructor
Exercise 4.4.5 Triangle Class: Constructor
Example 4.4.6 Rectangle toString
Example 4.4.7 Student toString
Exercise 4.4.8 toString for Flowers
Exercise 4.4.9 Instance Variables for Your Dog
Exercise 4.4.10 Student GPA Field
Free Response 4.4.11 Free Response: What instance variables?
Exercise 4.4.12 Pizza Time!
Exercise 4.4.13 Fractions
4.5 Writing Classes and Instance Methods
Video 4.5.1 Writing Instance Methods
Quiz 4.5.2 Quiz: Writing Methods
Example 4.5.3 Area of a Rectangle
Example 4.5.4 Moving a Point
Exercise 4.5.5 Writing getPerimeter()
Exercise 4.5.6 Honors Students
Exercise 4.5.7 The Full Triangle Class
Exercise 4.5.8 Batting Average
Exercise 4.5.9 Distance in Kilometers
4.6 Getter and Setter Methods
Video 4.6.1 Getter and Setter Methods
Quiz 4.6.2 Quiz: Getter and Setter Methods
Example 4.6.3 Rectangle Getter Methods
Example 4.6.4 Student Getter Methods
Exercise 4.6.5 Text Messages Getter Methods
Exercise 4.6.6 Fractions Getter/Setter Methods
Exercise 4.6.7 Full Fraction Class
4.7 Class Methods and Class Variables
Video 4.7.1 Static Methods and Variables (Class Methods and Class Variables)
Quiz 4.7.2 Quiz: Static Methods
Example 4.7.3 Student Class Variables and Methods
Example 4.7.4 Using the Math Class
Example 4.7.5 Using Randomizer
Example 4.7.6 Static Variables: Circle
Exercise 4.7.7 The Unit Circle
Exercise 4.7.8 How Many Players in the Game?
Exercise 4.7.9 Circle Area, another way
Practice 4.7.10 Rock, Paper, Scissors: Get Winner
Exercise 4.7.11 Rock, Paper, Scissors!
4.8 Method Overloading
Video 4.8.1 Method Overloading
Quiz 4.8.2 Method Overloading Quiz
Example 4.8.3 Sum Method Overloading
Example 4.8.4 Constructor Overloading
Exercise 4.8.5 Product Method Overloading
4.9 Local Variables and Scope
Video 4.9.1 Local Variables and Scope
Quiz 4.9.2 Local Variables and Scope Quiz
Example 4.9.3 Instance Variable Scope
Example 4.9.4 Local Variable Scope
Example 4.9.5 Variable Shadowing
Exercise 4.9.6 Which Variables Exist?
4.10 Key Terms for Classes
Video 4.10.1 Key Terms for Classes
Quiz 4.10.2 Quiz: This Keyword
Example 4.10.3 Rectangles and this
Exercise 4.10.4 Batteries
Exercise 4.10.5 Write Your Own CodeHS
4.11 Objects vs Primitives
Video 4.11.1 Objects vs Primitives
Quiz 4.11.2 Objects vs Primitives Quiz
Example 4.11.3 Comparing Rectangles
Example 4.11.4 Changing Dogs
Example 4.11.5 Null Pointer Exception
Free Response 4.11.6 Objects vs Primitives
Exercise 4.11.7 Comparing Circles
4.12 Inheritance
Video 4.12.1 Inheritance
Quiz 4.12.2 Quiz: Subclasses and Superclasses
Example 4.12.3 Square is a Rectangle
Exercise 4.12.4 Clothing Store
4.13 Class Design and Abstract Classes
Video 4.13.1 Class Design and Abstract Classes
Quiz 4.13.2 Quiz: Class Design
Example 4.13.3 The Shape Hierarchy
Example 4.13.4 Classes for Dessert
Exercise 4.13.5 Finding The Perimeters
4.14 Polymorphism
Video 4.14.1 Polymorphism
Quiz 4.14.2 Quiz: Polymorphism
Example 4.14.3 Animal Sounds
Example 4.14.4 Shape Areas
Exercise 4.14.5 Fun with Solids
4.15 Interfaces
Video 4.15.1 Interfaces
Quiz 4.15.2 Quiz: Interfaces
Example 4.15.3 Comparable Interface
Example 4.15.4 Summable Interface
Exercise 4.15.5 Fraction is Comparable
Exercise 4.15.6 City is Summable
Badge 4.15.7 Classes and Object-Oriented Programming Badge
4.16 Unit 4 Quiz
Quiz 4.16.1 Unit 4 - Classes and Object-Oriented Programming
5. Data Structures
5.1 What are Data Structures?
Video 5.1.1 What are Data Structures?
Quiz 5.1.2 Quiz: Data Structures
Free Response 5.1.3 Data Structures Everywhere
5.2 Introduction to Arrays
Video 5.2.1 Introduction to Arrays
Quiz 5.2.2 Quiz: Arrays
Example 5.2.3 Making an Array
Example 5.2.4 Make an Empty Array
Example 5.2.5 Indexing Into an Array
Exercise 5.2.6 Our First Array
Practice 5.2.7 Array Length
Practice 5.2.8 Last Element in Array
5.3 Using Arrays
Video 5.3.1 Using Arrays
Quiz 5.3.2 Quiz: Using Arrays
Example 5.3.3 Iterating Over an Array
Example 5.3.4 Sum Array
Example 5.3.5 Array Out of Bounds
Exercise 5.3.6 Print Array
Exercise 5.3.7 Print Odd Array Indices
Practice 5.3.8 Find the Minimum Index
Example 5.3.9 Classroom Example
Example 5.3.10 Exam Scores
Example 5.3.11 Array References
Practice 5.3.12 Find the Median
Exercise 5.3.13 Top Student
5.4 ArrayList Methods
Video 5.4.1 ArrayLists
Quiz 5.4.2 Quiz: ArrayList
Example 5.4.3 Hello World ArrayList
Example 5.4.4 ArrayList and Java Primitives
Example 5.4.5 ArrayList Size Method
Exercise 5.4.6 Get First Element
Example 5.4.7 Reading List
Example 5.4.8 Texting in Class
Exercise 5.4.9 Road Trip!
5.5 Arrays vs ArrayLists
Video 5.5.1 Arrays vs ArrayLists
Quiz 5.5.2 Quiz: Arrays vs ArrayList
Example 5.5.3 Expanding Array
Exercise 5.5.4 Improving Expanding Array
Example 5.5.5 Array vs ArrayList
5.6 The List Interface
Video 5.6.1 The List Interface
Quiz 5.6.2 The List Interface Quiz
Example 5.6.3 Reverse the List
Practice 5.6.4 Summer Reading
5.7 2D Arrays (Matrices or Grids)
Video 5.7.1 2D Arrays
Quiz 5.7.2 Quiz: 2D Arrays
Example 5.7.3 Nested Loops
Practice 5.7.4 Ice Cream Combos
Example 5.7.5 First 2D Array
Example 5.7.6 Initializing a 2D Array
Example 5.7.7 The Matrix
Practice 5.7.8 Sum Rows in a Matrix
5.8 HashMaps
Video 5.8.1 HashMaps
Quiz 5.8.2 Quiz: HashMaps
Example 5.8.3 The Phonebook
Exercise 5.8.4 Word Counts
5.9 Binary
Video 5.9.1 Number Systems
Quiz 5.9.2 Number Systems Quiz
Example 5.9.3 Converting Octal to Decimal
Practice 5.9.4 Converting Binary to Decimal
Video 5.9.5 Using Binary
Quiz 5.9.6 Using Binary Quiz
Example 5.9.7 Integer Limits
Practice 5.9.8 Binary Translator
5.10 Writing BlackJack
Video 5.10.1 The Card Class
Example 5.10.2 The Card Class
Video 5.10.3 The Deck Class
Example 5.10.4 The Deck Class
Video 5.10.5 The Hand Class
Example 5.10.6 The Hand Class
Video 5.10.7 The Blackjack Class
Example 5.10.8 The Blackjack Game
Exercise 5.10.9 Improving Blackjack
Badge 5.10.10 Data Structures Exercises Badge
5.11 Battleship
Video 5.11.1 Battleship Demo
Exercise 5.11.2 Battleship Part 1: The Ship Class
Exercise 5.11.3 Battleship Part 2: The Location Class
Exercise 5.11.4 Battleship Part 3: The Grid Class
Exercise 5.11.5 Battleship Part 4: Adding a Ship to the Grid
Exercise 5.11.6 Battleship Part 5: The Player Class
Exercise 5.11.7 Battleship Part 6: The Battleship Class
Exercise 5.11.8 Battleship Part 7: Finishing the Game
Exercise 5.11.9 Battleship Extensions
Badge 5.11.10 Battleship Badge
5.12 Unit Quiz
Quiz 5.12.1 Unit 5 - Data Structures
6. Final Project
6.1 Final Project
Free Response 6.1.1 Brainstorm
Free Response 6.1.2 Milestones
Exercise 6.1.3 Final Project
Badge 6.1.4 Final Project Badge
6.2 AP Java Completed
Badge 6.2.1 AP Java Badge