Core C++ – Professional Training for C++ Developers

The course objective is to give the students a stable basis of knowledge and skills for working as a C++ software engineer for the GNU Linux platform. The course covers the minimal set of knowledge and skills that a C++ developer should have: C++ language, object-oriented programming, standard C++ APIs (STL), XML, as well as software engineering. The course targets the gcc compiler for Linux and Eclipse CDT as development IDE.

1.    Introduction to Programming with C++

1.1.   Core C++ Course Overview (lectures: 1, exercises: 0)

-        Course scope, curriculum, exams, lectures, exercises

1.2.   Introduction to Computers, Computer Programming and C++ (lectures: 3, exercises: 0)

-        What Is a Computer?

-        Computer Organization

-        Early Operating Systems

-        Personal, Distributed and Client/Server Computing

-        The Internet and the World Wide Web

-        Machine Languages, Assembly Languages and High-Level Languages

-        History of C and C++

-        C++ Standard Library

-        Key Software Trend: Object Technology

-        Typical C++ Development Environment

-        Test-Driving a C++ Application

-        Software Engineering Case Study: Introduction to Object Technology and the UML

1.3.   Introduction to C++ Programming (lectures: 3, exercises: 2)

-        First Program in C++: Printing a Line of Text

-        Modifying Our First C++ Program

-        Another C++ Program: Adding Integers

-        Memory Concepts

-        Arithmetic

-        Decision Making: Equality and Relational Operators

-        Software Engineering Case Study: Examining the ATM Requirements Document

1.4.   Introduction to Classes and Objects (lectures: 3, exercises: 2)

-        Classes, Objects, Member Functions and Data Members

-        Defining a Class with a Member Function

-        Defining a Member Function with a Parameter

-        Data Members, set Functions and get Functions

-        Initializing Objects with Constructors

-        Placing a Class in a Separate File for Reusability

-        Separating Interface from Implementation

-        Validating Data with set Functions

-        Software Engineering Case Study: Identifying the Classes in the ATM Requirements Document

1.5.   Control Statements: Part 1 (lectures: 3, exercises: 2)

-        Algorithms

-        Pseudocode

-        Control Structures

-        if Selection Statement

-        if…else Double-Selection Statement

-        while Repetition Statement

-        Formulating Algorithms: Counter-Controlled Repetition

-        Formulating Algorithms: Sentinel-Controlled Repetition

-        Formulating Algorithms: Nested Control Statements

-        Assignment Operators

-        Increment and Decrement Operators

-        Software Engineering Case Study: Identifying Class Attributes in the ATM System

1.6.   Control Statements: Part 2 (lectures: 3, exercises: 2)

-        Essentials of Counter-Controlled Repetition

-        for Repetition Statement

-        Examples Using the for Statement

-        do…while Repetition Statement

-        switch Multiple-Selection Statement

-        break and continue Statements

-        Logical Operators

-        Confusing Equality (==) and Assignment (=) Operators

-        Structured Programming Summary

-        Software Engineering Case Study: Identifying Objects’ States and Activities in the ATM System

1.7.   Functions and an Introduction to Recursion: Part 1 (lectures: 3, exercises: 2)

-        Program Components in C++

-        Math Library Functions

-        Function Definitions with Multiple Parameters

-        Function Prototypes and Argument Coercion

-        C++ Standard Library Header Files

-        Case Study: Random Number Generation

-        Case Study: Game of Chance and Introducing enum

-        Storage Classes

-        Scope Rules

-        Function Call Stack and Activation Records

-        Functions with Empty Parameter Lists

1.8.   Functions and an Introduction to Recursion: Part 2 (lectures: 2, exercises: 2)

-        Inline Functions

-        References and Reference Parameters

-        Default Arguments

-        Unary Scope Resolution Operator

-        Function Overloading

-        Function Templates

-        Recursion

-        Example Using Recursion: Fibonacci Series

-        Recursion vs. Iteration

-        Software Engineering Case Study: Identifying Class Operations in the ATM System

1.9.   Arrays and Vectors (lectures: 4, exercises: 4)

-        Arrays

-        Declaring Arrays

-        Examples Using Arrays

-        Passing Arrays to Functions

-        Case Study: Class GradeBook Using an Array to Store Grades

-        Searching Arrays with Linear Search

-        Sorting Arrays with Insertion Sort

-        Multidimensional Arrays

-        Case Study: Class GradeBook Using a Two-Dimensional Array

-        Introduction to C++ Standard Library Class Template vector

-        Software Engineering Case Study: Collaboration Among Objects in the ATM System

1.10.   Pointers and Pointer-Based Strings (lectures: 4, exercises: 6)

-        Pointer Variable Declarations and Initialization

-        Pointer Operators

-        Passing Arguments to Functions by Reference with Pointers

-        Using const with Pointers

-        Selection Sort Using Pass-by-Reference

-        sizeof Operators

-        Pointer Expressions and Pointer Arithmetic

-        Relationship Between Pointers and Arrays

-        Arrays of Pointers

-        Case Study: Card Shuffling and Dealing Simulation

-        Function Pointers

-        Introduction to Pointer-Based String Processing

-        Fundamentals of Characters and Pointer-Based Strings

-        String Manipulation Functions of the String-Handling Library

Intermediate Exam #1 (problems: 4, check-up: 2)

-        3 practical problems (70% required to pass)

2.    Object-Oriented Programming with C++

2.1.   Object-Oriented Programming Concepts (lectures: 3, exercises: 0)

-     Object-Oriented Programming and Design Fundamentals

-     Classes, Objects, Encapsulation, Inheritance, Polymorphism

2.2.   Classes: A Deeper Look, Part 1 (lectures: 3, exercises: 4)

-        Time Class Case Study

-        Using #define, #ifndef and #endnf preprocessor directives

-        Class Scope and Accessing Class Members

-        Separating Interface from Implementation

-        Access Functions and Utility Functions

-        Time Class Case Study: Constructors with Default Arguments

-        Destructors

-        When Constructors and Destructors Are Called?

-        Time Class Case Study: A Subtle Trap Returning a Reference to a private Data Member

-        Default Memberwise Assignment

-        Software Reusability

-        Software Engineering Case Study: Starting to Program the Classes of the ATM System

2.3.   Classes: A Deeper Look, Part 2 (lectures: 4, exercises: 4)

-        const (Constant) Objects and const Member Functions

-        Composition: Objects as Members of Classes

-        friend Functions and friend Classes

-        Using the this Pointer

-        Dynamic Memory Management with Operators new and delete

-        static Class Members

-        Data Abstraction and Information Hiding

-        Example: Array Abstract Data Type

-        Example: String Abstract Data Type

-        Example: Queue Abstract Data Type

-        Container Classes and Iterators

-        Proxy Classes

2.4.   Operator Overloading (lectures: 4, exercises: 4)

-        Fundamentals of Operator Overloading

-        Restrictions on Operator Overloading

-        Operator Functions as Class Members vs. Global Functions

-        Overloading Stream Insertion and Stream Extraction Operators

-        Overloading Unary Operators

-        Overloading Binary Operators

-        Case Study: Array Class

-        Converting between Types

-        Case Study: String Class

-        Overloading ++ and –

-        Case Study: A Date Class

-        Standard Library Class string

-        explicit Constructors

2.5.   Object-Oriented Programming: Inheritance (lectures: 3, exercises: 3)

-        Base Classes and Derived Classes

-        protected Members

-        Relationship between Base Classes and Derived Classes

-        Creating and Using a CommissionEmployee Class

-        Creating a BasePlusCommissionEmployee Class Without Using Inheritance

-        Creating a CommissionEmployee-BasePlusCommissionEmployee Inheritance Hierarchy

-        CommissionEmployee-BasePlusCommissionEmployee Inheritance Hierarchy Using protected Data

-        CommissionEmployee-BasePlusCommissionEmployee Inheritance Hierarchy Using private Data

-        Constructors and Destructors in Derived Classes

-        public, protected and private Inheritance

-        Software Engineering with Inheritance

2.6.   Object-Oriented Programming: Polymorphism (lectures: 4, exercises: 4)

-        Polymorphism Examples

-        Relationships Among Objects in an Inheritance Hierarchy

-        Invoking Base-Class Functions from Derived-Class Objects

-        Aiming Derived-Class Pointers at Base-Class Objects

-        Derived-Class Member-Function Calls via Base-Class Pointers

-        Virtual Functions

-        Summary of the Allowed Assignments Between  Base-Class and Derived-Class Objects and Pointers

-        Type Fields and switch Statements

-        Abstract Classes and Pure virtual Functions

2.7.   Templates (lectures: 1, exercises: 3)

-        Function Templates

-        Overloading Function Templates

-        Class Templates

-        Nontype Parameters and Default Types for Class Templates

-        Notes on Templates and Inheritance

-        Notes on Templates and Friends

-        Notes on Templates and static Members

2.8.   Formatted Input/Output (lectures: 1, exercises: 2)

-        Formatting Output with printf        

-        Printing Integers    

-        Printing Floating-Point Numbers  

-        Printing Strings and Characters   

-        Other Conversion Specifiers        

-        Printing with Field Widths and Precisions           

-        Using Flags in the printf Format-Control String

-        Printing Literals and Escape Sequences 

-        Formatting Input with scanf

-        Using sprintf and sscanf

2.9.   Stream Input/Output (lectures: 3, exercises: 4)

-        StreamsClassic Streams vs. Standard Streams

-        iostream Library Header Files

-        Stream Input/Output Classes and Objects

-        Stream Output: Output of char* Variables, Character Output using Member Function put

-        Stream Input: get and getline, istream, peek, putback and ignore

-        Unformatted I/O using read, write and gcount

-        Stream Manipulators: dec, oct, hex and setbase, precision, setprecision, width, setw

-        Stream Format States and Stream Manipulators: showpoint, left, right, internal, fill, setfill, dec, oct, hex, showbase, scientific, fixed, uppercase, boolalpha, flags

-        Stream Error States

-        Tying an Output Stream to an Input Stream

2.10.   Exception Handling (lectures: 3, exercises: 2)

-        Exception-Handling Overview

-        Example: Handling an Attempt to Divide by Zero

-        When to Use Exception Handling

-        Rethrowing an Exception

-        Exception Specifications

-        Processing Unexpected Exceptions

-        Stack Unwinding

-        Constructors, Destructors and Exception Handling

-        Exceptions and Inheritance

-        Processing new Failures

-        Class auto_ptr and Dynamic Memory Allocation

-        Standard Library Exception Hierarchy

-        Other Error-Handling Techniques

2.11.   File Processing (lectures: 2, exercises: 4)

-        The Data Hierarchy

-        Files and Streams

-        Creating a Sequential File

-        Reading Data from a Sequential File

-        Updating Sequential Files

-        Random-Access Files

-        Creating a Random-Access File

-        Writing Data Randomly to a Random-Access File

-        Reading from a Random-Access File Sequentially

-        Case Study: A Transaction-Processing Program

-        Input/Output of Objects

2.12.   Class string and String Stream Processing (lectures: 2, exercises: 3)

-        string Assignment and Concatenation

-        Comparing strings

-        Substrings

-        Swapping strings

-        string Characteristics

-        Finding Strings and Characters in a string

-        Replacing Characters in a string

-        Inserting Characters into a string

-        Conversion to C-Style char * Strings

-        Iterators

-        String Stream Processing

2.13.   Regular Expressions (lectures: 1, exercises: 2)

-     The regular expressions language – literals and meta-characters, character classes, quantifiers, grouping characters, etc.

-     Regular expressions in C++

-     Searching, extracting, validating, splitting and replacing text by regular expressions

2.14.   The Preprocessor (lectures: 1, exercises: 1)

-     The #include Preprocessor Directive

-     The #define Preprocessor Directive: Symbolic Constants

-     The #define Preprocessor Directive: Macros

-