Skip to main content


City School District

C++ Programming

Home  \  Classrooms  \  Business  \  D. Houston  \  C++ Programming

C++ Programming

The purpose of this  C++ course is to focus on fundametals first by introducing basic programming concepts and techniques before designing custom classes.  The only way to learn programming is by doing, you need to practice and use your time wisely.

The Game Programming portion of the course will introduce students to the C++ language from a game programming perspective.


Classroom Assignments

Day 1

Introduction to the course - Classroom Rules - Syllabus

3 Programmers and 3 Programming Languages - Research
Day 2

Pre-Test Project

Peanut Butter and Jelly Project/Picture Drawing/Algorithms/Flowcharts

Homework - Flowchart 
Chapter 1 Introduction to Computers, Programs, and C++
Understand computer basics, programs, and operating systems.
Describe the History of C++
Write a simple C++ program for console output
Understand the C++ program development cycle.
Programming style and documentation
Explain the differences between syntax errors, runtime errors, and logic errors. 
Assignments: Programming Exercises 1.1 - 1.12 Programming Switch
Week 2
Chapter 2 Elementary Programming
To write C++ programs that perform simple computations.
To read input from the keyboard.
To use identifiers to name elements such as variable and functions. 
To use variables to store data.
To program using assignment statements and assignment expressions.
To name constants using the const keyword.
To declare variables using numeric data types.
To write integer literals, floating-point literals, and literals in scientific notation.
To perform operations using operators +, -, *. /, and %.
To perform exponent operations using the pow(a,  b) function. 
To write and evaluate expressions.
To obtain the current system time using time(0)
To use augmented assignment operators (+=, -=, *=, /=, %=). 
To distinguish between post increment and preincrement and between posdecrement and predecrement.
To convert numbers to different type using casting
To describe the software development process and apply it to develop the loan payment program.
To write a program that converts a large amount of money into smaller units.
To avoid common errors in elementary programming. 
Chapter 3 Selection
To declare bool variables and write Boolean expressions using relational operators.
To implement selection control using one-way if statements.
To implement selection control using two-way if statements. 
To implement selection control using nested if and multi-way if-else statements.
To avoid common errors and pitfalls in if statements.
To program using selection statements for a variety of examples.
To generate random numbers using the rand function and set a seen using the srand function.
To combine conditions using logical operators.
To program using selection statements with combined conditions. 
To implement selection control using switch statements. 
To write expressions using the conditional expressions.
To examine the rules governing operator precedence and operator associativity.
To debug errors. 
Chapter 4 Mathematical Functions, Characters, and Strings
To solve mathematics problems by using the C++ mathematical functions
To represent characters using the char type 
To encode characters using ASCII code
To read a character from the keyboard
To represent special characters using the escape sequences
To cast a numeric value to a character and cast a character to an integer
To compare and test characters
To program using characters (DisplayRandomCharacter, GuessBirthday Programs)
To test and convert characters using the C++ character functions
To convert a hexadecimal character to a decimal value
To represent strings using the string type and introduce objects and instance functions
To use the subscript operator for accessing and modifying characters in a string
To use the + operator to concatenate strings
To compare strings using the relational operators
To read strings from the keyboard
To revise the Lottery Program using strings
To format output using String manipulators
To read/write data from/to a file 
Chapter 5 Loops
To write programs that execute statements repeatedly using a while loop 
To follow the loop design strategy to develop loops 
To control a loop with the user confirmation
To control a loop with a sentinel value
To obtain input from a file using input redirection rather than  typing from the keyboard
To read all data from a file
To write loops using do-while statements
To write loops using for statements 
To discover the similarities and differences of three types of loop statements.
To write nested loops
To learn the techniques for minimizing numerical errors
To learn loops from a variety of examples (GCD, FutureTuition, MonteCarloSimulation, Dec2Hex)
To implement program control with break and continue
To write a program that tests palindromes
To write a program that displays prime numbers
Chapter 6 Functions
To define functions with formal parameters
To define/invoke value-returning functions
To define/invoke void functions
To pass arguments by value
To develop reusable code that is modular, easy to read, easy to debug, and easy to maintain.
To use function overloading and understand ambiguous overloading.
To use funtion prototypes to declare function headers.
To define functions with default arguments
To improve runtime efficiency for short functions using inline functions.
To determine the scope of local and global variables
To pass arguments by reference and understand the differences between pass-by-value and pass-by-references.
To declare const parameters to prevent them from being modified accidentally.
To write a function that converts a hexadecimal number to a decimal number.
To design and implement functions using stepwise refinement. 
Chapter 7 Single-Dimensional Arrays and C-Strings
To describe why an array is necessary in programming.
To declare arrays.
To access array elements using indexes.
To initialize the values in an array.
To program common array operations (displying arrays, summing all elements, finding min and max elements, random shuffling, shifting elements).
To apply arrays in application development (LottoNumbers, DeckOfCards Programs).
To define and invoke functions with array arguments.
To dfine a const  array parameter to prevent it from being changed.
To return an array by passing it as an argument.
To count occurrences of each letter in an array of characters (CountLettersInArray Program).
To search elements using the linear or binary search algorithm.
To sort an array using the selecttion sort.
To represent strings using C-strings and use C-string functions. 
Chapter 8 Multidimensional Arrays
To give examples of representing data using two-dimensional arrays.
To declare two-dimensional arrays and access array elements in a two-dimensional array using row and column indexes.
To program commons operations for two-dimensional arrays (displaying arrays, summing all elements, finding min and max elements, and random shuffling).
To pass two-dimensional arrays to functions.
To write a program for grading multiple-choice quesitons using two-dimensional arrays.
To solve the closest pair problem using two-dimensional arrays.
To check a Sudoku solution using two-dimensional arrays.
To declare and use multidimensional arrays. 
Chapter 9 Objects and Classes
To describe objecst and classes, and to use classes to model objects.
To use UML graphical notations to describe classes and objects.
To demonstrate defining classes and creating objects.
To create objects using constructos.
To access data fields and invoke functions using the object member access operator.
To separate a class definiton from a class implementation.
To prevent multiple inlcusions of header files using the #ifndef  inclusions guard directive.
To know what inline functions in a class are.
To declare private data fields with appropriate get and set functions for data filed encapsulation and make classes easy to maintain. 
To understand the scope of data fields.
To apply class abstraction to develop software. 
Chapter 10 Object-Oriented Thinking - The String Class
To process strings using the string class. 
To develp funtions with object arguments.
To store and process objects in arrays.
To distinguish between instance and static variables and functions.
To define constant functions to prevent data fields from being modified accidentally.
To explore the differnces between the procedural paradigm and object-oriented paradigm.
To design a a class for body mass index.
To develop classes for modeling composition relationships.
To design a class for a stack.
To design classes that follow the class design guidelines. 
Chapter 11 Pointers and Dynamic Memory Management 
To describe what a pointer is.
To learn how to declare a pointer and assign a memory address to it.
To access values via pointers.
To define synonymous types using the typedef keyword.
To declare constant pointers and cosntant data.
To explore the relationship between arrays and pointers and access array elements using pointers.
To pass pointer arguments to a function.
To use array functions with pointers.
To use the new operator to create dynamic arrays.
To create objects dynamically and access objects via pointers.
To reference the calling object using the this pointer. 
To implement the destructor for performing customized operations.
To design a class for students registering courses.
To create an object using the copy constructor that copies data from another object of the same type.
To customize the copy constructor for performing a deep copy. 
Chapter 12 Templates, Vectors, and Stacks 
To know the motivation and benefits of templates.
To define a template function with type parameters.
To develp a generic sort function using templates.
To use the C++ vector class as a resizable array.
To replace arrays using vectors.
To parse and evaluate expressions using stacks. 
  Second Text Book Syllabus

Chapter 1 C++ Basics: Lost Fortune

Lecture: Basic Input and Output, Arithmetic Computations, Variables, Constants, and Enumerations

Chapter 2 Truth and Branching: Guess My Number

Lecture: Simple and compound conditions, If Statements, Switch Statements, Do Loops, and While Loops, the Game Loop, Random Number Generation

Chapter 3 For Loops, Strings, and Arrays: Word Jumble

Lecture: Iterating over Sequences, Objects (data members and member functions), String Objects and their member Functions, Arrays (sequences of any type)

Chapter 4 The Standard Template Library: Hangman

Lecture: Libraries, Vectors, and other Collections, Ireators and Indirect access, Algorithms, Planning with Pseudocode

Chapter 5 Functions: Mad Lib

Lecture: Arguments and Parameters, Return Values, Global Variables and Global Constants, Overloading Functions, Inlining Functions

Chapter 6 References: Tic-Tac-Toe

Lecture: Referencing Variables, Dereferencing Values, Passing References, altering Argument Variables, Returning References

Chapter 7 Pointers: Tic-Tac-Toe 2.0

Lecture: Computer Memory, Declaring and Initializing Pointers, Dereferencing Pointers, Constants and Pointers, Passing and Returning Pointers, Pointers and Arrays

Chapter 8 More Classes: Critter Caretaker

Lecture: Creating new Types, Data Members and Member Functions, Instantiating Objects, Constructors

Chapter 8: More Classes: Critter Caretaker

Lecture: Setting Member Access Levels, Accessor Member Functions, Constant Member Functions, Static Data Members and Member Functions

Chapter 9 Advanced Classes

Lecture: Combining Objects, Friend Functions, Overloading Operators

Chapter 9 Dynamic Memory: Game Lobby

Lecture: Dynamically Allocated Memory, Acquiring and Freeing Memory, Memory Leaks, Shallow and Deep Copies

Chapter 10 Inheritance

Lecture: Base and Derived Classes, Inherited Data Members and Member Functions, Overriding Base Class Member Functions

Chapter 10 Polymorphism: Blackjack

Lecture: Virtual Functions and Polymorphic Behavior, Pure Virtual Functions and Abstract Classes

Group Projects

Group Projects

Designing Your Own Game

Final Project