Topic Name Description
Course Introduction 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 URL 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 URL 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 URL 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 URL 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 URL 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.

URL Input-Output Exercises

Complete these exercises to check your understanding of input and output.

2.1: Conditional and Iteration Structures File 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 URL Software Unit Test Policy and Coverage Analysis

Read this section and the one on coverage analysis 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 URL 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 URL 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 URL 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.

URL String Arrays

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

URL 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.

URL Strings and Characters

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

Unit 2 Exercises URL Practice with Iterations

Complete these exercises to test your understanding of iterations.

URL Practice with Functions

Complete these exercises to test your understanding of functions.

URL C++ Problem Set

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

URL C String Exercises

Complete these exercises to test your understanding of string arrays.

3.1: Arrays URL Arrays

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

Page Multidimensional Arrays

Watch this video to learn about multidimensional arrays.

3.2: Structs, Unions, and Enumerations URL Enumeration

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

URL Structs

Structs are a great way to pair multiple variables together and allow them to be passed as a group.

URL 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 URL Practice with Arrays

Complete these exercises to test your understanding of arrays.

URL More Practice with Arrays

Complete the assessments at the bottom of this page to test your understanding of arrays and how to use them.

4.1: Class Design File 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.

URL Basics of Inheritance in C++ With Examples

This article demonstrates some examples of inheritance.

URL 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 URL 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.

URL 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 URL 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 URL 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. 

URL 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 URL 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 URL Practice with File Handling

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

Course Feedback Survey URL Course Feedback Survey