Please enable JavaScript to use CodeHS

Outline


1. C++ Basics
1.1 Input, Output, and Program Structure
Notes 1.1.1 Input, Output, and Program Structure
Example 1.1.2 Hello World
Example 1.1.3 Input and Output
Example 1.1.4 getline and cin
Example 1.1.5 Program Structure
Quiz 1.1.6 Quiz: Input, Output, and Program Structure
Exercise 1.1.7 Create a Haiku
Exercise 1.1.8 Favorites
Exercise 1.1.9 Put the Code in Order
1.2 Basic Data Types
Notes 1.2.1 Basic Data Types
Example 1.2.2 Strings and Characters
Example 1.2.3 Numbers
Example 1.2.4 Booleans
Quiz 1.2.5 Quiz: Basic Data Types
Exercise 1.2.6 Hole in One
Exercise 1.2.7 Loose Change
Exercise 1.2.8 Fast Food
1.3 Conditional Statements
Notes 1.3.1 Conditional Statements
Example 1.3.2 Basic If/Else Statements
Example 1.3.3 Comparing Strings
Example 1.3.4 Logical Operators
Quiz 1.3.5 Quiz: Conditional Statements
Exercise 1.3.6 Paper Supplier
Exercise 1.3.7 Choose your own adventure
1.4 Loops
Notes 1.4.1 Loops
Example 1.4.2 For Loops
Example 1.4.3 While Loops
Example 1.4.4 Searching a String
Quiz 1.4.5 Quiz: Loops
Exercise 1.4.6 Summing a Number's Digits
Exercise 1.4.7 Hacker Speak
Exercise 1.4.8 The Necklace Problem
1.5 Functions in C++
Notes 1.5.1 Functions in C++
Example 1.5.2 Defining and Calling Functions
Example 1.5.3 Passing by Reference vs Value
Example 1.5.4 Function Prototypes
Quiz 1.5.5 Quiz: Functions in C++
Exercise 1.5.6 Drawing a Triangle
Exercise 1.5.7 Easier Input
Exercise 1.5.8 Encryption
1.6 Project: Code Verification
Exercise 1.6.1 Code Verification
1.7 End of Unit Quiz
Quiz 1.7.1 Quiz: C++ Basics
2. Going Beyond The Basics
2.1 Vector Basics
Notes 2.1.1 Vector Basics
Example 2.1.2 Creating and Accessing Vectors
Example 2.1.3 Inserting into a Vector
Example 2.1.4 Looping Through a Vector
Quiz 2.1.5 Quiz: Vector Basics
Exercise 2.1.6 Splitting a Vector
Exercise 2.1.7 A Sorted Addition
Exercise 2.1.8 Final Grade Calculator
2.2 Function Default Values
Notes 2.2.1 Function Default Values
Example 2.2.2 Default Values
Example 2.2.3 Default Values with a Prototype
Example 2.2.4 Example: Splitting a String
Quiz 2.2.5 Quiz: Function Default Values
Exercise 2.2.6 Burrito Bowl
Exercise 2.2.7 Better Number Inputs
Exercise 2.2.8 Appointment Follow Up
2.3 Structs
Notes 2.3.1 Structs
Example 2.3.2 Defining and Accessing Structs
Example 2.3.3 Using Structs: Line Length
Quiz 2.3.4 Quiz: Structs
Exercise 2.3.5 Songs
Exercise 2.3.6 Movies - Part 1
2.4 File Input/Output
Notes 2.4.1 File Input/Output
Example 2.4.2 Reading In a File
Example 2.4.3 Processing a File
Example 2.4.4 Writing To a File
Quiz 2.4.5 Quiz: File Input/Output
Exercise 2.4.6 Sum From A File
Exercise 2.4.7 Movies - Part 2
2.5 Error Handling
Notes 2.5.1 Error Handling
Example 2.5.2 Validating a Number
Example 2.5.3 Validating a Vector Index
Example 2.5.4 Throwing Other Values
Quiz 2.5.5 Quiz: Error Handling
Exercise 2.5.6 Next Birthday
Exercise 2.5.7 Movies - Part 3
2.6 Project: Karel Internship
Exercise 2.6.1 Part 1 - Karel Internship
Exercise 2.6.2 Part 2 - Karel Internship
2.7 End of Unit Quiz
Quiz 2.7.1 Quiz: Going Beyond The Basics
3. Libraries
3.1 Header Files
Notes 3.1.1 Header Files
Example 3.1.2 Header File
Example 3.1.3 Header and Implementation File
Example 3.1.4 Safer Header
Quiz 3.1.5 Quiz: Header Files
Exercise 3.1.6 Convert to Uppercase
Exercise 3.1.7 Basic Math Library
3.2 Using Libraries
Notes 3.2.1 Using Libraries
Example 3.2.2 The Util Library
Example 3.2.3 Built in Util Library
Quiz 3.2.4 Quiz: Using Libraries
Exercise 3.2.5 Number Guessing Game
Exercise 3.2.6 Patient Records
3.3 Project: The Game of Pig
Free Response 3.3.1 The Game of Pig
Exercise 3.3.2 Build the Basic Program
Exercise 3.3.3 Adding a Computer Opponent
3.4 End of Unit Quiz
Quiz 3.4.1 Quiz: Libraries
4. 2D Vectors, Stacks, and Queues
4.1 2D Vectors
Notes 4.1.1 2D Vectors
Example 4.1.2 The 2D Vector
Example 4.1.3 Creating a 2D Vector
Quiz 4.1.4 Quiz: 2D Vectors
Exercise 4.1.5 Magic Square Tester
Exercise 4.1.6 Gradient
4.2 Project: The Game of Life
Exercise 4.2.1 Creating the Board
Exercise 4.2.2 Adding the Simulator
4.3 Stacks
Notes 4.3.1 Stacks
Example 4.3.2 Basic Stack
Example 4.3.3 Stack Example: Reverse a String
Quiz 4.3.4 Quiz: Stacks
Exercise 4.3.5 Browser History
Exercise 4.3.6 Error Checking
4.4 Project: RPN Calculator
Demo 4.4.1 What is an RPN Calculator?
Exercise 4.4.2 Building the Calculator
4.5 Queues
Notes 4.5.1 Queues
Example 4.5.2 Basic Queue
Example 4.5.3 Queue Example: Next in Line
Quiz 4.5.4 Quiz: Queues
Exercise 4.5.5 Line Simulator - Single Queue
Exercise 4.5.6 Line Simulator - Three Queues
4.6 Project: Karaoke Night
Exercise 4.6.1 Project: Karaoke Night
4.7 End of Unit Quiz
Quiz 4.7.1 Quiz: 2D Vectors, Stacks, and Queues
5. Sets and Maps
5.1 Pairs and Iterators
Notes 5.1.1 Pairs and Iterators
Example 5.1.2 Pairs
Example 5.1.3 Iterators
Quiz 5.1.4 Quiz: Pairs and Iterators
Exercise 5.1.5 Deck of Cards
Free Response 5.1.6 Comparing ways to Loop Through a Vector
5.2 Sets
Notes 5.2.1 Sets
Example 5.2.2 Basic Sets
Example 5.2.3 Iterating Through a Set
Example 5.2.4 Sets of Struct Values
Quiz 5.2.5 Quiz: Sets
Exercise 5.2.6 Visiting All the Teams
Exercise 5.2.7 Movies - Part 4
5.3 Project: Bingo
Demo 5.3.1 Bingo - Demo
Exercise 5.3.2 Part 1 - Game Setup
Exercise 5.3.3 Part 2 - Playing a Turn
Exercise 5.3.4 Part 3 - Finding a Winner
5.4 Maps
Notes 5.4.1 Maps
Example 5.4.2 Map Basics
Example 5.4.3 Iterating Through a Map
Example 5.4.4 Updating Maps
Quiz 5.4.5 Quiz: Maps
Exercise 5.4.6 Word Count
Exercise 5.4.7 Car Registration
5.5 Project: FRC Scoring System
Free Response 5.5.1 FRC Scoring - Planning
Exercise 5.5.2 FRC Scoring - Build
5.6 End of Unit Quiz
Quiz 5.6.1 Quiz: Sets and Maps
6. Recursion
6.1 Functional Recursion
Notes 6.1.1 Functional Recursion
Example 6.1.2 Basic Recursive Problem: Exponential
Example 6.1.3 Recursion Example: Reverse String
Example 6.1.4 Recursion Example: Make Sum
Quiz 6.1.5 Quiz: Functional Recursion
Exercise 6.1.6 Sum Digits
Exercise 6.1.7 Remove a Letter
Exercise 6.1.8 Valid DNA Sequences
Exercise 6.1.9 Subsequence
6.2 Procedural Recursion
Notes 6.2.1 Procedural Recursion
Example 6.2.2 Print Binary
Example 6.2.3 Recursion Example: Print Permutations
Example 6.2.4 Depth versus Breadth Search
Quiz 6.2.5 Quiz: Procedural Recursion
Exercise 6.2.6 Print All Binary Permutations
Exercise 6.2.7 Pascal's Triangle
Exercise 6.2.8 Phone Words
6.3 Recursive Backtracking
Notes 6.3.1 Recursive Backtracking
Example 6.3.2 Basic Backtracking
Example 6.3.3 Eight Queens
Quiz 6.3.4 Quiz: Recursive Backtracking
Exercise 6.3.5 Dice Sum
Exercise 6.3.6 Airfreight
Exercise 6.3.7 Cell Phone Towers
6.4 Project: Sudoku Solver
Exercise 6.4.1 Set Up
Exercise 6.4.2 isValid
Exercise 6.4.3 nextEmpty
Exercise 6.4.4 Final Build
6.5 End of Unit Quiz
Quiz 6.5.1 Quiz: Recursion
7. Pointers, Linked Lists, and Graphs
7.1 Pointers
Notes 7.1.1 Pointers
Example 7.1.2 Assigning and Updating Pointers
Example 7.1.3 Pointers and Functions
Example 7.1.4 Pointers and Data Structures
Quiz 7.1.5 Quiz: Pointers
Exercise 7.1.6 Print Stats
Exercise 7.1.7 Stocks - Part 1
Exercise 7.1.8 Stocks - Part 2
7.2 Project: Team Roster
Demo 7.2.1 Project Demo
Exercise 7.2.2 Team Roster
7.3 Linked Lists
Notes 7.3.1 Linked Lists
Example 7.3.2 Basic Linked List
Example 7.3.3 Linked List and Recursion
Example 7.3.4 Example: Sorted Phone Book
Quiz 7.3.5 Quiz: Linked List
Exercise 7.3.6 Remove From the Phone Book
Exercise 7.3.7 Really Long Division
Example 7.3.8 Doubly Linked List
Exercise 7.3.9 Playlist
7.4 Project: Mail Forwarding
Exercise 7.4.1 Part 1: Creating the Structure
Exercise 7.4.2 Part 2: Adding Utilities
Exercise 7.4.3 Adding the User Interface
7.5 Graphs
Notes 7.5.1 Graphs
Example 7.5.2 Basic Example: Breadth First Search
Example 7.5.3 Application: Connecting Cities
Quiz 7.5.4 Quiz: Graphs
Exercise 7.5.5 Extending Connecting Cities
Exercise 7.5.6 LinkedOut: A High School Social Network
7.6 End of Unit Quiz
Quiz 7.6.1 Quiz: Pointers, Linked Lists, and Graphs
8. Final Project
8.1 Virtual Lines
Demo 8.1.1 Final Project Demo
Exercise 8.1.2 Part 1 - Creating the Basic Queue
Exercise 8.1.3 Part 2 - Adding Basic Functionality
Exercise 8.1.4 Part 3 - Adding the User Interface
Exercise 8.1.5 Part 4 - Only One Queue per Person