Topic Name Description
Page Course Syllabus
Page Course Terms of Use
1.1: A Basic History of C++ Page The History of Programming

Watch this video for a broad overview of the history of computer programming in general.

Page Introduction to C++

Read this article on the history of C++ programming to see how C++ evolved into what it is today.

1.2: How to Compile and Run a C++ Program Page How to Compile a C/C++ Program on Ubuntu Linux

If you are running a Linux operating system, read this article on how to compile and run a C++ program. Even though you do not yet understand the C++ language, you can follow the operational steps to compile a program from C++ to machine code.

Page Installing the Eclipse CDT, Part 1

Watch this video to learn how to install the Eclipse CDT.

Page Installing the Eclipse CDT, Part 2

For the programming in this course, we will use the Eclipse CDT. In order to follow these steps, you need to first install Eclipse. You can go to https://www.eclipse.org/downloads/ to download the Eclipse software, which then prepares you for write Java code. However, we want to write code in C++ instead of Java, so we have to take a few additional steps that are different depending on your operating system. Those steps are described in this article.

Page "Hello World"

After you watch this video, try to create, compile, and run your own Hello World program.

1.3: Simple C++ Commands Page Understanding the "Hello World" Program

After you read this article, compile the example and make sure you understand the code in each line.

1.4: Variables, Data Types, and Constants Page C Variables and Data Types

Read this article about data types. Although this article discusses C, the data types in C++ are exactly the same. The only difference is that C does not include a boolean variable. For now, just note that a boolean variable holds a value of either True or False.

Page C++ Variables and Data Types

Watch this video, which explains how data types are used in C++.

1.5: Basic Input and Output Page Taking User Input

Watch this (admittedly robotic) video, which explains input and output.

1.6: Arithmetic Operators Page C Operators

We touched on operators in the previous unit, but now we will cover them in more detail. Even though this is C and not C++, there are no major differences in their operators.

Page Arithmetic Operators in C and C++

Watch this video, which discusses the use of arithmetic operators and their real world applications.

Unit 1 Exercises Book Basic C++ Exercises

Exercises 1 to 36 cover basic C++ concepts that you should be able to complete if you have worked through all of the materials in unit 1. Start with some early problems, then try a few from the middle, and then a few more later from the list. Do not attempt any of the problems after Exercise 36, as we haven't learned these concepts yet. Don't worry, we will come back to them.

Book Input-Output Exercises
Complete these exercises to check your understanding of input and output.
2.1: Conditional and Iteration Structures Page Flow of Control

Read these lecture notes to learn about control structures in C++ programming. Compile the examples from the notes, and make sure you understand the code in each line. After reading these notes, you should be able to define conditional structures, iteration structures, and jump statements.

Page If-Else Statements

Computers are thought to be very intelligent machines, but they are only as intelligent as the humans that program them. If-else gives programs the capability to make decisions and provide an illusion of intelligence. Watch this video to learn how to add this intelligence capability to your programs.

Page Complex Conditions

Simple decisions are useful on many occasions, but sometimes decisions are more complex and have multiple layers. Here you can learn how to combine if statements with AND and OR to address many different scenarios.

Page While Loops

While decisions give computers their "intellectual" abilities, loops give them their usefulness. The ability to repeat something over and over for dozens, hundreds, or even millions of times ensures that computer programs can perform tasks that are quite complex in a fraction of the time it takes us humans. The while loop is the fundamental approach to repetitive sequences.

Page Do-While Loops

The do-while loop is a version of the while loop. Though it is possible that a program will never enter the loop with a while loop (since it is possible that the condition is already met before entering the loop), do-while loops guarantee that the loop gets performed at least once. Watch this video to learn how do-while loops differ from the standard while loop.

Page For Loops

Although while loops are the basic loop structure, for loops are the enhanced version of while loops that allow for more flexibility, and let programmers simplify and improve the accuracy of their code. Watch this video to learn how to use for loops. 

2.2: Testing and Debugging Page Software Unit Test Policy and Coverage Analysis

Read this section to learn more about the basics of software testing.

Page Debugging in Eclipse

Learning to debug is an essential skill for any programming language. Knowing how to search your code for bugs, walk through the program's interpretation, and examine the variable manipulation is an essential part of debugging. Learn how to use the tools built into the Eclipse environment to debug your program. Though this video refers to Java, debugging C++ in Eclipse works similarly.

2.3: The Scope of Variables in a Simple Function Page Functions in C++

Functions are small segments of code that are removed from the normal code flow, and they are called to perform specific actions. After the function executes, control returns back to the normal flow. Within a function, data may be sent and returned to the rest of the program.

2.4: Arguments Passed by Value and by Reference in a Simple Function Page Passing Arguments by Value and by Reference

When data is passed by value, the actual contents of the variable is passed. However, with some data, you may instead simply want the program to access the data directly from the current location where it is stored. To do this, you pass the value by reference, which tells the function to access the address of the variable.

2.5: Functions of the String Class Page Strings

Now we'll explore the use of string arrays, which are part of C programming. C did not allow for the use of strings initially, so string arrays are simply a string of characters that are stored in an array. We haven't discussed arrays yet, but this is a great introduction to the use of character strings.

Page String Arrays

Review this page for some more information on character strings, or string arrays.

Page The String Class

The string class is an extension that was added to C++ that deals with character strings as strings, not as arrays. Read this article to learn how to use classes to call methods and how to manipulate strings to access text data.

Page Strings and Characters

This chapter highlights the many different functions that are part of the string class in C++.

Unit 2 Exercises Page Practice with Iterations

Complete these exercises to test your understanding of iterations. 

Book Practice with Functions

Complete these exercises to test your understanding of functions.

Book C++ Problem Set

Answer the six questions in problem set 1. After you finish, check your answers.

Book C String Exercises

Complete these exercises to test your understanding of string arrays.

3.1: Arrays Page Arrays

Arrays are the most basic data structure in C++. Read this page to learn about arrays.

Page More on Arrays

Watch these videos about the different features and types of arrays. 

Page Multidimensional Arrays

Watch this video to learn about multidimensional arrays.

3.2: Structs, Unions, and Enumerations Page Enumeration

Enumerated types (enums) are essentially a series of int variables that represent more complex data types.

Page Structs and Unions

Structs are a great way to pair multiple variables together and allow them to be passed as a group. Unions are very similar to structs, but the data shares the same memory spaces, so they cannot be used at the same time.

Page Unions

Unions are very similar to structs, but the data shares the same memory spaces, so they cannot be used at the same time.

Unit 3 Exercises Book Practice with Arrays

Complete these exercises to test your understanding of arrays.

Book More Practice with Arrays

Complete these assessments to test your understanding of arrays and how to use them.

4.1: Class Design Page Object-Oriented Programming (OOP) and Inheritance

Classes are what separate the capabilities of C from that of C++. Classes are the object-oriented aspect of programming.

To think about classes, consider writing utensils. A pen, a pencil, and a marker are all writing utensils. However, when a pen uses ink; a pencil uses graphite, and so forth. The color of the pencil or the pen might be different, but their shapes and behaviors are the same. This is what object-oriented programming is about. We can define the characteristics of a writing utensil and then create specific instances of each object based on the unique characteristics of each instance of the object, without having to define their common characteristics each time.

Page Classes and Objects

This video is a great demonstration of the use of classes.

4.2: Inheritance between Classes Page Inheritance

Watch this video on inheritance between classes.

Page Basics of Inheritance in C++ With Examples

This article demonstrates some examples of inheritance.

Page Static Attributes

Static attributes allow us to store one value for a variable that is consistent through all instances of a class. Read this article to see how this is implemented.

4.3: Polymorphism Page Encapsulation, Inheritance, and Polymorphism In C++

This article reviews inheritance and explains polymorphism.

Page Polymorphism

Polymorphism is not easy to grasp. This video provides a solid explanation of the concept.

Page Operator Overloading

Operators play an important role in computer programming. By using it, you can change the behavior of an operator based on the types of its arguments.

File Encapsulation and Polymorphism

Review these slides, which summarize the concepts you have been learning thus far.

Unit 4 Exercises Page Practice with Inheritance

Complete this assignment by copying the text into Eclipse. Compile and run the code, and then complete assignment 6. Create, compile, and run the code to check your understanding of this concept. The instructions for both provide details for running in a command line environment. Ignore this information and create the file in your Eclipse environment as you usually do.

5.1: Writing Class and Function Templates Page C++ Templates

Read this article, which discusses generic programming and the use of templates.

Page Introduction to C++ Templates

Watch this video to learn more about templates.

5.2: Inputting and Outputting with Files Page Reading File Input in C++

The ability to read from a file is a critical task that allows for batch processing. Watch this video to learn how you can read data from a file, so that data input doesn't always have to come from the keyboard.

Page Output File Streams in C++

Sometimes once you have finished processing your data, you want to save the data so that it can be re-input at a later time as an input file. Watch this video to learn how to write to an output file using output file streams. 

Page Input and Output

Read this article and complete the exercises at the end to test your skills in inputting from and outputting to files.

5.3: Exception Handling Page Exception Handling

When things go wrong in programming, as they usually do, the last thing you want is for the program to crash or perform some erroneous actions. Using exception handling allows the programmer to control what happens when the unexpected happens.

Unit 5 Exercises Book Practice with File Handling

Complete these activities to practice reading from and writing to files.

Study Guide Book CS107 Study Guide
Course Feedback Survey URL Course Feedback Survey