This comprehensive course consists of three modules. A preliminary module reviews topics, including inheritance, the ANSI C++ Standard Library, templates, I/O streams, and practical issues such as reliability, testing, efficiency and interfacing to C. This material can be customized or removed depending on the level of class knowledge.

The second module covers more advanced topics. Issues of inheritance and polymorphism are covered, as well as principles of effective class design, exception handling and runtime type information (RTTI). Participants will explore multiple inheritance, including the complications that are introduced by this powerful feature, and advanced applications of C++ concepts, including smart pointers and reference counting.

The third module introduces the Standard Template Library (STL). The main components of data structures, algorithms and iterators will all be studies. Illustrations are provided of a number of important containers –  such as vectors, stacks, queues, lists and sets – and extensive programming examples and exercises are provided. A number of progressively developed case studies are used to illustrate object oriented programming techniques and to give the student practical experience in putting together features of C++ learned in the course.

Audience: This course is intended for experienced C++ programmers who wish to deepen their understanding of the language and learn advanced techniques.
Course Duration: 5 days
Prerequisites:

Participants are recommended to have substantial C++ programming experience before attending this class.

Course Outline:
  • Inheritance and Polymorphism
    • Inheritance Concept oInheritance in C++
    • Protected Members
    • Base Class Initializer List
    • Composition
    • Member Initialization List
    • Order of Initialization
    • Inheritance vs. Composition
    • Summary – Inheritance
    • A Case for Polymorphism
    • Dynamic Binding
    • Pointer Conversion in Inheritance
    • Polymorphism Using Dynamic Binding
    • Virtual Functi oon Specification
    • Invoking Virtual Functions
    • VTable
    • Virtual Destructors
    • Abstract Class Using Pure Virtual
    • Function
    • Employee as an Abstract Class
    • Heterogeneous Collections
    • Summary – Polymorphism

 

  • ANSI C++ Library
    • ANSI C++ Library
    • Hello ANSI C++
    • Namespaces
    • ANSI C++ String Class
    • Templates

 

  • Templates
    • General Purpose Functions
    • Macros oFunction Templates
    • Template Parameters
    • Template Parameter Conversion
    • Function Template Problem
    • Generic Programming
    • General Purpose Classes
    • Class Templates
    • Array Class Implementation (array.h)
    • Using the Array Template
    • Template Parameters
    • Advanced C++ Programming
    • Class Template Instantiation
    • Non Type Parameter Conversion
    • Standard Template Library
    • STL Components
    • Generic Programming
    • STL Elements of a Simple Program
    • Simple STL Program
    • Map Container
  • Input/Output in C++
    • Input/Output in C++
    • Built-in Stream Objects
    • Output Operator << oInput Operator >>
    • Character Input
    • String Input
    • Formatted I/O
    • Streams Hierarchy (Simplified)
    • File I/O
    • File Opening
    • Integer File Copy
    • Character File Copy
    • Overloading Stream Operators
    • Implementing Overloaded Stream
    • Operators

 

  • Practical Aspects of C++
    • Programming
    • Interfacing C++ to Other Languages
    • Calling C from C++
    • _cplusplus Macro
    • Calling C++ from C
    • Interface Module for Stack Class
    • Namespace Collisions
    • ANSI Namespace
    • Reliability Philosophies of Languages
    • Prototypes and Type Checking
    • Constant Types
    • Access Control in C++
    • Reviews and Inspections
    • Inspections and C++
    • Testing Strategies for C++
    • Performance Considerations
    • Class Libraries

 

  • Advanced Polymorphism and Inheritance
    • Inheritance
    • Good Class Design
    • String Class
    • Public Inheritance
    • Public Inheritance Problems
    • Inheritance and Semantics
    • Private Inheritance
    • Composition
    • Composition vs. Private Inheritance
    • Templates vs. Inheritance
    • Protected Inheritance
    • Implementation Encapsulation
    • Interface Inheritance

 

  • Exception Handling
    • Exception Handling
    • Try and catch
    • Exception Flow of Control
    • Context and Stack Unwinding
    • Handling Exceptions in best Context
    • Benefits of Exception Handling
    • Unhandled Exceptions
    • Clean Up
    • Multiple Catch Handlers

 

  • Runtime Type Information
    • Runtime Type and Polymorphism
    • Type_info Class
    • Typeid Operator
    • Compiler Options
    • Safe Pointer Conversions
    • Dynamic Cast
    • New C++ Style Casts
    • Static Cast
    • Reinterpret Cast
    • Const Cast

 

  • Inheritance Hierarchies and Multiple
    • Inheritance
    • Class Hierarchy in Smalltalk
    • Smalltalk Class Hierarchy (Simplified)
    • Collection Classers
    • Multiple Inheritance Solution
    • Basic Derivation
    • Ambiguities in Multiple Inheritance
    • Resolving Ambiguity
    • Duplicate Subobjects
    • Virtual Base Classes

 

  • Applications of C++ Concepts
    • Orthodox Canonical Form (Review)
    • Object Validation
    • String Class
    • Smart Strings
    • Reference Counting