Please enable JavaScript to use CodeHS

K12 Introduction to Java Semester B - Outline

  1. Classes and Object-Oriented Programming

    1. 1.1 Introduction to Classes and Objects

    2. Video 1.1.1 What is a Class?
    3. Quiz 1.1.2 Quiz: Classes and Objects
    4. Example 1.1.3 The Rectangle Class
    5. Example 1.1.4 The Point Class
    6. Example 1.1.5 The Student Class
    7. Exercise 1.1.6 Using the Rectangle Class
    8. Exercise 1.1.7 Calling A Method
    9. Exercise 1.1.8 Using the Point Class
    10. Exercise 1.1.9 Using the Student Class
    11. 1.2 Classes vs. Objects

    12. Video 1.2.1 Classes and Objects
    13. Quiz 1.2.2 Classes vs. Objects vs. Instances
    14. Example 1.2.3 Classes, Objects, and Instances
    15. Example 1.2.4 Creating Rectangle Objects
    16. Exercise 1.2.5 Text Messages
    17. 1.3 Using a Class as a Client

    18. Video 1.3.1 How to Use a Class
    19. Quiz 1.3.2 Quiz: Client of a Class
    20. Example 1.3.3 Using the Rectangle Class as a Client
    21. Example 1.3.4 Using the Randomizer Class as a Client
    22. Exercise 1.3.5 Coin Flips
    23. Exercise 1.3.6 Longest Streak
    24. Example 1.3.7 Testing the GeoLocation Class
    25. Exercise 1.3.8 How Far Away is ...?
    26. 1.4 Writing Classes

    27. Video 1.4.1 Constructors
    28. Quiz 1.4.2 Quiz: Constructors
    29. Example 1.4.3 Student Constructor
    30. Example 1.4.4 Rectangle Constructor
    31. Exercise 1.4.5 Triangle Class: Constructor
    32. Example 1.4.6 Rectangle toString
    33. Example 1.4.7 Student toString
    34. Exercise 1.4.8 toString for Flowers
    35. Exercise 1.4.9 Instance Variables for Your Dog
    36. Exercise 1.4.10 Student GPA Field
    37. Free Response 1.4.11 Free Response: What instance variables?
    38. Exercise 1.4.12 Pizza Time!
    39. Exercise 1.4.13 Fractions
    40. 1.5 Writing Classes and Instance Methods

    41. Video 1.5.1 Writing Instance Methods
    42. Quiz 1.5.2 Quiz: Writing Methods
    43. Example 1.5.3 Area of a Rectangle
    44. Example 1.5.4 Moving a Point
    45. Exercise 1.5.5 Writing getPerimeter()
    46. Exercise 1.5.6 Honors Students
    47. Exercise 1.5.7 The Full Triangle Class
    48. Exercise 1.5.8 Batting Average
    49. Exercise 1.5.9 Distance in Kilometers
    50. 1.6 Getter and Setter Methods

    51. Video 1.6.1 Getter and Setter Methods
    52. Quiz 1.6.2 Quiz: Getter and Setter Methods
    53. Example 1.6.3 Rectangle Getter Methods
    54. Example 1.6.4 Student Getter Methods
    55. Exercise 1.6.5 Text Messages Getter Methods
    56. Exercise 1.6.6 Fractions Getter/Setter Methods
    57. Exercise 1.6.7 Full Fraction Class
    58. 1.7 Class Methods and Class Variables

    59. Video 1.7.1 Static Methods and Variables (Class Methods and Class Variables)
    60. Quiz 1.7.2 Quiz: Static Methods
    61. Example 1.7.3 Student Class Variables and Methods
    62. Example 1.7.4 Using the Math Class
    63. Example 1.7.5 Using Randomizer
    64. Example 1.7.6 Static Variables: Circle
    65. Exercise 1.7.7 The Unit Circle
    66. Exercise 1.7.8 How Many Players in the Game?
    67. Exercise 1.7.9 Circle Area, another way
    68. Practice 1.7.10 Rock, Paper, Scissors: Get Winner
    69. Exercise 1.7.11 Rock, Paper, Scissors!
    70. 1.8 Method Overloading

    71. Video 1.8.1 Method Overloading
    72. Quiz 1.8.2 Method Overloading Quiz
    73. Example 1.8.3 Sum Method Overloading
    74. Example 1.8.4 Constructor Overloading
    75. Exercise 1.8.5 Product Method Overloading
    76. 1.9 Local Variables and Scope

    77. Video 1.9.1 Local Variables and Scope
    78. Quiz 1.9.2 Local Variables and Scope Quiz
    79. Example 1.9.3 Instance Variable Scope
    80. Example 1.9.4 Local Variable Scope
    81. Example 1.9.5 Variable Shadowing
    82. Exercise 1.9.6 Which Variables Exist?
    83. 1.10 Key Terms for Classes

    84. Video 1.10.1 Key Terms for Classes
    85. Quiz 1.10.2 Quiz: This Keyword
    86. Example 1.10.3 Rectangles and this
    87. Exercise 1.10.4 Batteries
    88. Exercise 1.10.5 Write Your Own CodeHS
    89. 1.11 Objects vs Primitives

    90. Video 1.11.1 Objects vs Primitives
    91. Quiz 1.11.2 Objects vs Primitives Quiz
    92. Example 1.11.3 Comparing Rectangles
    93. Example 1.11.4 Changing Dogs
    94. Example 1.11.5 Null Pointer Exception
    95. Free Response 1.11.6 Objects vs Primitives
    96. Exercise 1.11.7 Comparing Circles
    97. 1.12 Inheritance

    98. Video 1.12.1 Inheritance
    99. Quiz 1.12.2 Quiz: Subclasses and Superclasses
    100. Example 1.12.3 Square is a Rectangle
    101. Exercise 1.12.4 Finding The Perimeters
    102. 1.13 Class Design and Abstract Classes

    103. Video 1.13.1 Class Design and Abstract Classes
    104. Quiz 1.13.2 Quiz: Class Design
    105. Example 1.13.3 The Shape Hierarchy
    106. Example 1.13.4 Classes for Dessert
    107. Exercise 1.13.5 Clothing Store
    108. 1.14 Polymorphism

    109. Video 1.14.1 Polymorphism
    110. Quiz 1.14.2 Quiz: Polymorphism
    111. Example 1.14.3 Animal Sounds
    112. Example 1.14.4 Shape Areas
    113. Exercise 1.14.5 Fun with Solids
    114. 1.15 Interfaces

    115. Video 1.15.1 Interfaces
    116. Quiz 1.15.2 Quiz: Interfaces
    117. Example 1.15.3 Comparable Interface
    118. Example 1.15.4 Summable Interface
    119. Exercise 1.15.5 Fraction is Comparable
    120. Exercise 1.15.6 City is Summable
    121. Badge 1.15.7 Classes and Object-Oriented Programming Badge
    122. 1.16 Unit 4 Quiz

    123. Quiz 1.16.1 Unit 4 - Classes and Object-Oriented Programming
  2. Data Structures

    1. 2.1 What are Data Structures?

    2. Video 2.1.1 What are Data Structures?
    3. Quiz 2.1.2 Quiz: Data Structures
    4. Free Response 2.1.3 Data Structures Everywhere
    5. 2.2 Introduction to Arrays

    6. Video 2.2.1 Introduction to Arrays
    7. Quiz 2.2.2 Quiz: Arrays
    8. Example 2.2.3 Making an Array
    9. Example 2.2.4 Make an Empty Array
    10. Example 2.2.5 Indexing Into an Array
    11. Exercise 2.2.6 Our First Array
    12. Practice 2.2.7 Array Length
    13. Practice 2.2.8 Last Element in Array
    14. 2.3 Using Arrays

    15. Video 2.3.1 Using Arrays
    16. Quiz 2.3.2 Quiz: Using Arrays
    17. Example 2.3.3 Iterating Over an Array
    18. Example 2.3.4 Sum Array
    19. Example 2.3.5 Array Out of Bounds
    20. Exercise 2.3.6 Print Array
    21. Exercise 2.3.7 Print Odd Array Indices
    22. Practice 2.3.8 Find the Minimum Index
    23. Example 2.3.9 Classroom Example
    24. Example 2.3.10 Exam Scores
    25. Example 2.3.11 Array References
    26. Practice 2.3.12 Find the Median
    27. Exercise 2.3.13 Top Student
    28. 2.4 ArrayList Methods

    29. Video 2.4.1 ArrayLists
    30. Quiz 2.4.2 Quiz: ArrayList
    31. Example 2.4.3 Hello World ArrayList
    32. Example 2.4.4 ArrayList and Java Primitives
    33. Example 2.4.5 ArrayList Size Method
    34. Exercise 2.4.6 Get First Element
    35. Example 2.4.7 Reading List
    36. Example 2.4.8 Texting in Class
    37. Exercise 2.4.9 Road Trip!
    38. 2.5 Arrays vs ArrayLists

    39. Video 2.5.1 Arrays vs ArrayLists
    40. Quiz 2.5.2 Quiz: Arrays vs ArrayList
    41. Example 2.5.3 Expanding Array
    42. Exercise 2.5.4 Improving Expanding Array
    43. Example 2.5.5 Array vs ArrayList
    44. 2.6 The List Interface

    45. Video 2.6.1 The List Interface
    46. Quiz 2.6.2 The List Interface Quiz
    47. Example 2.6.3 Reverse the List
    48. Practice 2.6.4 Summer Reading
    49. 2.7 2D Arrays (Matrices or Grids)

    50. Video 2.7.1 2D Arrays
    51. Quiz 2.7.2 Quiz: 2D Arrays
    52. Example 2.7.3 Nested Loops
    53. Practice 2.7.4 Ice Cream Combos
    54. Example 2.7.5 First 2D Array
    55. Example 2.7.6 Initializing a 2D Array
    56. Example 2.7.7 The Matrix
    57. Practice 2.7.8 Sum Rows in a Matrix
    58. 2.8 HashMaps

    59. Video 2.8.1 HashMaps
    60. Quiz 2.8.2 Quiz: HashMaps
    61. Example 2.8.3 The Phonebook
    62. Exercise 2.8.4 Word Counts
    63. 2.9 Binary

    64. Video 2.9.1 Number Systems
    65. Quiz 2.9.2 Number Systems Quiz
    66. Example 2.9.3 Converting Octal to Decimal
    67. Practice 2.9.4 Converting Binary to Decimal
    68. Video 2.9.5 Using Binary
    69. Quiz 2.9.6 Using Binary Quiz
    70. Example 2.9.7 Integer Limits
    71. Practice 2.9.8 Binary Translator
    72. 2.10 Writing BlackJack

    73. Video 2.10.1 The Card Class
    74. Example 2.10.2 The Card Class
    75. Video 2.10.3 The Deck Class
    76. Example 2.10.4 The Deck Class
    77. Video 2.10.5 The Hand Class
    78. Example 2.10.6 The Hand Class
    79. Video 2.10.7 The Blackjack Class
    80. Example 2.10.8 The Blackjack Game
    81. Exercise 2.10.9 Improving Blackjack
    82. Badge 2.10.10 Data Structures Exercises Badge
    83. 2.11 Battleship

    84. Video 2.11.1 Battleship Demo
    85. Exercise 2.11.2 Battleship Part 1: The Ship Class
    86. Exercise 2.11.3 Battleship Part 2: The Location Class
    87. Exercise 2.11.4 Battleship Part 3: The Grid Class
    88. Exercise 2.11.5 Battleship Part 4: Adding a Ship to the Grid
    89. Exercise 2.11.6 Battleship Part 5: The Player Class
    90. Exercise 2.11.7 Battleship Part 6: The Battleship Class
    91. Exercise 2.11.8 Battleship Part 7: Finishing the Game
    92. Exercise 2.11.9 Battleship Extensions
    93. Badge 2.11.10 Battleship Badge
    94. 2.12 Unit Quiz

    95. Quiz 2.12.1 Unit 5 - Data Structures
  3. Final Project

    1. 3.1 Final Project

    2. Free Response 3.1.1 Brainstorm
    3. Free Response 3.1.2 Milestones
    4. Exercise 3.1.3 Final Project
    5. Badge 3.1.4 Final Project Badge
    6. 3.2 Intro Java Completed

    7. Badge 3.2.1 Intro Java Badge
  4. Algorithms and Recursion

    1. 4.1 What is an Algorithm?

    2. Video 4.1.1 What is an Algorithm?
    3. Free Response 4.1.2 Every Day Algorithms
    4. 4.2 Linear Search

    5. Video 4.2.1 Linear Search
    6. Example 4.2.2 Linear Search
    7. Practice 4.2.3 Linear Search on ArrayList
    8. Resource 4.2.4 Gradebook FRQ
    9. 4.3 Binary Search

    10. Video 4.3.1 Binary Search
    11. Check for Understanding 4.3.2 Binary Search
    12. Example 4.3.3 Binary Search
    13. Exercise 4.3.4 Comparing Binary Search and Linear Search
    14. Badge 4.3.5 Binary Search Badge
    15. 4.4 Selection Sort

    16. Video 4.4.1 Selection Sort
    17. Check for Understanding 4.4.2 Selection Sort
    18. Example 4.4.3 Selection Sort
    19. Example 4.4.4 Visualizing Algorithms
    20. Exercise 4.4.5 Explore Selection Sort
    21. 4.5 Insertion Sort

    22. Video 4.5.1 Insertion Sort
    23. Check for Understanding 4.5.2 Insertion Sort
    24. Example 4.5.3 Visualizing Algorithms
    25. Example 4.5.4 Insertion Sort
    26. Exercise 4.5.5 Explore Insertion Sort
    27. 4.6 Advanced: Recursion

    28. Video 4.6.1 Recursion
    29. Example 4.6.2 Factorial
    30. Practice 4.6.3 Factorial Unit Test Example
    31. Video 4.6.4 Recursion Walkthrough
    32. Example 4.6.5 Recursion Example
    33. Example 4.6.6 Recursive Binary Search
    34. Example 4.6.7 Fibonacci Recursive
    35. Practice 4.6.8 Bacteria Cultures
    36. Practice 4.6.9 Recursive Minimum
    37. 4.7 Mergesort

    38. Video 4.7.1 Mergesort
    39. Example 4.7.2 Visualizing Algorithms
    40. Example 4.7.3 Merge Sort
    41. Exercise 4.7.4 Explore Merge Sort
    42. Badge 4.7.5 Algorithms Badge
    43. 4.8 Informal Code Analysis

    44. Video 4.8.1 Informal Code Analysis
    45. Check for Understanding 4.8.2 Informal Code Analysis
    46. Example 4.8.3 Loop Execution Count
    47. Example 4.8.4 While Loop Time
    48. Example 4.8.5 For Loop Time
    49. Free Response 4.8.6 Time Comparisons
    50. Exercise 4.8.7 Improving isChar Speed
    51. Example 4.8.8 Improving isChar Speed Check
    52. Free Response 4.8.9 isChar Speed Reflection
    53. 4.9 Algorithms and Recursion Quiz

    54. Unit Quiz 4.9.1 Algorithms and Recursion Quiz
  5. Project: Pokemon Simulation

    1. 5.1 Pokemon Simulation

    2. Video 5.1.1 Pokemon Demo
    3. Challenge 5.1.2 The Move Class
    4. Challenge 5.1.3 The Pokemon Class
    5. Challenge 5.1.4 Adding Pokemon Images
    6. Challenge 5.1.5 Pokemon can Attack!
    7. Challenge 5.1.6 The PokemonTrainer Class
    8. Challenge 5.1.7 The PokemonSimulation Class
    9. Challenge 5.1.8 Finishing the Battle
    10. Challenge 5.1.9 Adding the ComputerTrainer
    11. Challenge 5.1.10 Pokemon Extensions
    12. Badge 5.1.11 Pokemon Badge
  6. Project: Mad Libs

    1. 6.1 Mad Libs

    2. Video 6.1.1 Mad Libs Demo
    3. Challenge 6.1.2 Collecting the Placeholders
    4. Challenge 6.1.3 Getting User Input
    5. Challenge 6.1.4 Replacing a Placeholder
    6. Challenge 6.1.5 Generating the Mad Lib
    7. Challenge 6.1.6 Write your own Mad Lib!
    8. Challenge 6.1.7 Mad Lib Extensions
  7. Java Outside of CodeHS

    1. 7.1 Java Outside of CodeHS

    2. Video 7.1.1 Java Outside of CodeHS
    3. Video 7.1.2 Hello World in Eclipse
    4. Video 7.1.3 Hello World in BlueJ
    5. Video 7.1.4 Hello World in Terminal
    6. Video 7.1.5 Java main vs run
    7. Video 7.1.6 Using the main Method in Eclipse
    8. Video 7.1.7 Using the main Method in BlueJ
    9. Video 7.1.8 Using the main Method in the Terminal
    10. Example 7.1.9 Hello World with main Method
    11. Video 7.1.10 Getting User Input
    12. Example 7.1.11 Using Scanner for Input
  8. Project: Quiz Creation

    1. 8.1 Quiz Creation

    2. Video 8.1.1 Quiz Demo
    3. Challenge 8.1.2 The Question Class
    4. Challenge 8.1.3 Question toString
    5. Challenge 8.1.4 The Quiz Class
    6. Challenge 8.1.5 Using the QuizFileReader Class
    7. Challenge 8.1.6 Constructing Quizzes from Files
    8. Challenge 8.1.7 The QuizRunner Class
    9. Challenge 8.1.8 Write your own Quiz!
    10. Challenge 8.1.9 Quiz Extensions
  9. Computer Ethics

    1. 9.1 Computer Ethics

    2. Resource 9.1.1 Student Honor Code
    3. Resource 9.1.2 Computing Ethics
    4. Free Response 9.1.3 Self Driving Cars
  10. Java Pretest

    1. 10.1 Java Pretest

    2. Notes 10.1.1 About the Pretest
    3. Survey 10.1.2 Mindsets
    4. Quiz 10.1.3 Knowledge & Skills: Java
  11. Java Posttest

    1. 11.1 Java Posttest

    2. Notes 11.1.1 About the Posttest
    3. Survey 11.1.2 Mindsets
    4. Quiz 11.1.3 Java Knowledge & Skills