All Seasons

Season 1

  • S01E01 Compiling Your First C++ Program

    • January 1, 2019

    Uncover the power and appeal of C++ for a wide range of uses. Then learn that by processing only 0’s and 1’s, a computer obeys the varied commands of a complex language such as C++. Write a traditional, “Hello, World!” program and discover the importance of adding comments to your code. Finally, follow the instructions in the Quick Start video at the end of this lecture to get C++ working on your own computer or device—by going to an online programming editor or by downloading a C++ integrated development environment (IDE), tailored to your operating system.

  • S01E02 C++ QUICK START: With Browser or Download

    • January 1, 2019

    C++ QUICK START: With Browser or Download

  • S01E03 Variables, Computations, and Input in C++

    • January 1, 2019

    Try out a program that calculates calories in different foods, demonstrating the essential elements of a program: input, variables, computations, and output. Learn to specify a variable’s type and value, and get advice on shortcuts for keeping your instructions clean. Also discover the origin of the name C++, which signals that the language is designed to do whatever C can do—and then some.

  • S01E04 Booleans and Conditionals in C++

    • January 1, 2019

    Probe the power of conditionals, which let you construct programs that can choose between true and false alternatives. Learn to use the keyword bool, which stands for Boolean variable—a value that can be either true (1) or false (0). Study the three basic Boolean operations—and, or, not—and see how they can be combined to make truly complex logical operations.

  • S01E05 Program Design and Writing Test Cases in C++

    • January 1, 2019

    There’s more to making a program than writing code. Begin by focusing on the importance of the header and special commands. Then consider how to use comments as “pseudocode” to design the structure that a particular program should follow. Finally, explore the crucial strategy of testing as you go, rather than when the program is complete and errors made near the start are harder to track down.

  • S01E06 C++ Loops and Iteration

    • January 1, 2019

    Harness the power of loops, which are sections of code that repeat until a specified computation is complete. Focus on two main types of loops: while loops and for loops, with the latter being a compact way to make the loop occur a set number of times. Learn how to prevent infinite loops, and see how scope allows you to have separate variables inside and outside loops.

  • S01E07 Importing C++ Functions and Libraries

    • January 1, 2019

    The secret for building an enormous program such as Windows, with millions of lines of code, is that it draws on ready-made code libraries. Investigate the options that libraries offer, from choosing random numbers to performing complex mathematical operations. Learn how to access a code library, and get tips for finding additional resources beyond the C++ standard libraries.

  • S01E08 Arrays for Quick and Easy Data Storage

    • January 1, 2019

    In the first of two lectures on storing large amounts of data, learn the utility of arrays. An array is a collection of variables of the same type. Find out how to declare an array of variables and how to provide an index, which permits access to a specific value within the array. Finally, probe the “out-of-bounds” error that can arise with arrays and see how it led to a notorious security breach.

  • S01E09 Vectors for Safe and Flexible Data Storage

    • January 1, 2019

    Continue your study of data storage strategies by looking at vectors, which handle variables in much the same way as arrays but with distinct advantages, including the ability to change the size of a data structure dynamically. Learn how and when to use vectors, and discover that vectors offer a convenient fix for the out-of-bounds error introduced in the previous lecture.

  • S01E10 C++ Strings for Manipulating Text

    • January 1, 2019

    Go beyond numbers to see how letters and punctuation are used in data strings, which are ordered sequences of characters. Examine string literals, which are specific fixed sequences of text; and string variables, which are the main way to process and control text data, such as names and addresses. Learn how to search, alphabetize, and concatenate string variables in C++.

  • S01E11 Files and Stream Operators in C++

    • January 1, 2019

    Data files are collections of information that are accessed and manipulated through a program. See how data streaming techniques you've already used apply to reading and writing files with the library fstream. Discover that you've already been using an entity that will become increasingly important in the course: objects, which are entities combining variables and functions.

  • S01E12 Top-Down Design and Using a C++ Debugger

    • January 1, 2019

    Get to know the vital task of debugging—finding and fixing errors in your code. First, consider the advantages of top-down design, where a complex task is divided into manageable sub-tasks, as opposed to the bottom-up approach that lets complexity emerge more organically, if less predictably. See how incremental development helps in debugging through tools such as the breakpoint and step-over commands.

  • S01E13 Creating Your Own Functions in C++

    • January 1, 2019

    Functions serve as ready-made, self-contained units of code that perform a particular task, such as solving an equation, enumerating a list, or even something as simple as closing a file. Prepare for the intensive use of functions in the rest of the course by learning the basic commands that allow you to create your own functions. Get your feet wet with several examples.

  • S01E14 Expanding What Your Functions Can Do in C++

    • January 1, 2019

    A parameter is a piece of data used as input into a function. Discover how to create two functions, each with the same name, but with different numbers of parameters—an approach called overloading. Also look at different ways to “pass” parameters to produce an output, either preserving the parameter’s value (pass by value) or changing it (pass by reference).

  • S01E15 Systematic Debugging, Writing Exceptions

    • January 1, 2019

    Dig deeper into debugging, learning to employ a tool called exception handling. An exception is a special note that something has gone wrong in a program. Know how to follow up these crucial clues. Also zero in on the six major steps of debugging: isolate the error, narrow down the failure point, identify the problem, fix the problem, re-test, and look for similar cases.

  • S01E16 Functions in Top-Down and Bottom-Up Design

    • January 1, 2019

    Revisit top-down versus bottom-up approaches to coding, this time using functions as the building blocks of your program. First, create a game with the top-down strategy, identifying the individual functions that you need in a flowchart. Then design a tool for word processing by using the bottom-up tactic, in which you take available functions and create something completely new.

  • S01E17 Objects and Classes: Encapsulation in C++

    • January 1, 2019

    So far, you’ve focused on procedurally oriented programming, which characterizes the original C computer language that led to C++. Now turn to one of the major strengths and innovations of C++: object-oriented programming. Learn that objects are variables and functions encapsulated within classes. Investigate the great utility of this technique for organizing and manipulating data.

  • S01E18 Object-Oriented Constructors and Operators

    • January 1, 2019

    The ability to design appropriate classes may be the single most important skill in object-oriented programming. Survey two key tools for using classes effectively. First, constructors let you create classes that fit the requirements of the objects within them. Second, operator overloading allows you to tailor operators to a specific function, providing a handy shortcut that streamlines coding.

  • S01E19 Dynamic Memory Allocation and Pointers

    • January 1, 2019

    C++ provides different ways to control data storage in memory. Investigate dynamic memory allocation, which allows memory to grow and shrink with the demands of a program as it is running—as opposed to static memory, which is fixed at runtime. Practice managing memory in a 20-questions-type game and compare the advantages of allocating dynamic memory with pointers versus vectors.

  • S01E20 Object-Oriented Programming with Inheritance

    • January 1, 2019

    Explore the power of inheritance, which is a technique for creating classes that inherit properties from another class, called the base class. Using this tool, you can define a variable or function just once and then use it in multiple classes. Walk through several examples of inheritance, seeing how it greatly reduces complexity by eliminating redundant code.

  • S01E21 Object-Oriented Programming with Polymorphism

    • January 1, 2019

    Study a key object-oriented feature called polymorphism, which means “many shapes” and refers to the ability of a class to be used in multiple ways. Start with a superclass that is specialized into multiple subclasses, each of which has a different implementation. Learn to define virtual functions for the superclass, leading to diverse properties in the subclasses.

  • S01E22 Using Classes to Build a Game Engine in C++

    • January 1, 2019

    Use your knowledge of object-oriented programming to design a “game engine” that can be used for building multiple games. Take a top-down approach, drawing on encapsulation, hierarchical inheritance, and polymorphism to create the two-person game Othello, also known as Reversi. Discover the ease with which you can create other subclasses for additional games, such as checkers and chess.

  • S01E23 C++ Templates, Containers, and the STL

    • January 1, 2019

    Whenever you have an idea that’s so general that it’s not tied down by any specific data type, you’ll want to turn to generic programming, which substitutes a template for a data type. The Standard Template Library (STL) is a menu of generic container structures that address these types of problems. Learn the advantages of various containers, including queues, lists, stacks, and vectors.

  • S01E24 C++ Associative Containers and Algorithms

    • January 1, 2019

    Probe deeper into generic programming and the STL, focusing on associative containers and algorithms. The former is a set of templates that lets you group different elements into ordered sets, while algorithms are rules that handle data or accomplish some other task, allowing advanced operations to be performed very quickly. Learn that algorithms are a powerful tool in programming.

  • S01E25 Artificial Intelligence Algorithm for a Game

    • January 1, 2019

    Finish the course by drawing on all you have learned to design a game-playing algorithm for artificial intelligence—that is, a program that makes “intelligent” game moves as if it were human. Finally, look ahead to your options for continuing study in computer programming. With elementary C++ under your belt, there are many directions you can go in mastering this valuable skill.