EEC Logo


Advanced C++ Programming

Duration: 4 days

Audience

Software engineers, programmers, and analysts who have been designing and creating programs using C++ and desire a higher level of technical detail to allow them more flexibility and productivity when writing C++ programs. Anyone desiring the ability to read and understand complex C++ programs for maintenance or learning purposes.

Course Contents

  1. A Review of C++ and Classes
    1. Why Object-Oriented Programming?
    2. Nested Classes and Structures
    3. const and static Members
    4. The mutable Keyword (likely a new topic for many students)
    5. explicit constructors (likely a new topic for many students)
    6. How Virtual Functions are Implemented (vptr and vtbl details)
    7. Name Mangling
    8. Pointers to Class Members (likely a new topic for many students)
  2. Operator Overloading in Detail
    1. Overview
    2. Semantic Consistency
    3. Member-only Operators
    4. Non-member-only Operators
    5. Implementation Details
    6. Recommendations When Using Operator Overloading
  3. Template Classes and Functions
    1. What Problem Do Templates Solve?
    2. Template Instantiation
    3. Template Parameters (and default parameters)
    4. Function Templates
    5. Template Specialization
    6. Function Objects (a.k.a. functors)
    7. Organizing Source Code to be "Template-friendly"
    8. Overview of the Standard Template Library (STL)
  4. Streams-based IO
    1. Stream IO vs. File IO
    2. Design of the C++ IO Subsystem
    3. Output Formatting
    4. Stream Buffering
    5. Application Interface
    6. Adding Overloaded IO Operators
    7. Using File IO Objects
    8. Using String Streams
  5. Inheritance
    1. What Is (and Why Use) Inheritance?
    2. Abstract Base Classes
    3. Multiple Inheritance and Virtual Base Classes
    4. Method Disambiguation
    5. Functional Separation
    6. Implementation Details
  6. Overview of the Standard Template Library
    1. What is the Standard Template Library?
    2. Which Container Classes are Provided?
    3. Which Iterator Types are Provided?
    4. Which Generic Algorithms are Provided?
    5. Examples
    6. Auto Pointers Using auto_ptr
  7. Miscellaneous Topics
    1. Iterator Concepts
    2. Exception Handling (and when to use them or not use them)
    3. New-style Casts
    4. Run-time Type Identification
  8. Implementing the Gang of Four Design Patterns in C++
  9. Creational Patterns
    1. Abstract Factory
    2. Builder
    3. Factory Method
    4. Prototype
    5. Singleton
  10. Structural Patterns
    1. Adapter
    2. Bridge
    3. Composite
    4. Decorator
    5. Fa¸la;ade
    6. Flyweight
    7. Proxy
  11. Behavioural Patterns
    1. Chain of Responsibility
    2. Command
    3. Interpreter
    4. Iterator
    5. Mediator
    6. Memento
    7. Observer
    8. State
    9. Strategy
    10. Template (Template Method)
    11. Visitor

Course Objectives

Upon completion of this course, the student will be able to:

Instructional Technique

Students are invited to bring their current ideas and questions to the classroom for discussion. Lecture, group problem solving, and online laboratories will be used. Students will be encouraged to enhance their skills utilizing the techniques presented through classroom problem solving and controlled online workshops. This course is approximately 40% labwork.

This course does not concentrate on the use of any one particular development tool. Instead, the students are encouraged to learn the proper design and implementation techniques by hand-coding their applications. If development tools are available at the training site, the instructor can demonstrate their use and guide the students in the use of such tools, if desired. Please specify when booking which tools the customer would like discussed.

Some very old compilers do not support features discussed in this course (although no coverage of C++11 is provided). We have a Unix-style script that will compile and test the lab solutions on your system as a way to ensure the compatibility of your compiler with this course. (We primarily test using GNU GCC v3 and v4.)

Prerequisites

This course teaches the student how to solve problems arising from subtleties of the C++ language, as well as techniques for improving performance and efficiency. Therefore, programming experience in C++ for at least 3 months is preferred for the student to gain the maximum benefit from this course, although experience in other object-oriented programming languages may suffice. The students should be familiar with the editors available on the lab equipment as they will be creating many source code files. Some prior experience with the compiler used in the lab is helpful, but not required. Contact our office with any questions.