Preferred method of contact:

C++ Best Practices and Design Patterns



Course Number



4 Days
Request Team Training

PDF Add to WishList

About This Course: The ability to leverage the work of others, avoid pitfalls, and apply proven idioms and patterns can greatly improve the effectiveness of programming efforts. In this course, you learn to increase productivity by combining tools, idioms, syntax, and libraries to produce industrial-strength C++ code. Numerous hands-on exercises provide real-world experience in developing high-quality C++.

You Will Learn How To

  • Design and implement efficient object-oriented solutions using C++
  • Improve code quality using design patterns
  • Modify a poorly structured application to increase flexibility, robustness, and efficiency
  • Build robust libraries using namespaces, templates, and exceptions

Important Course Information

  • Requirements

    You should have a basic knowledge of C++ programming. You should understand the following concepts as implemented in C++:
    •  Classes and objects
    •  Inheritance
    • Polymorphism or virtual functions
    • Function overloading
    • Six months' full-time C++ programming experience

Course Outline

  • Introduction to Object-Oriented Development

OO fundamentals

  • Inheritance, encapsulation and polymorphism
  • Classes, objects, and attributes
  • Associations, messages and methods
  • Interfaces and abstract classes

Using the Unified Modeling Language

  • Characteristics of UML
  • Mapping UML into C++

Exploiting development tools

  • Automating the life cycle with CASE tools
  • Code generation and reverse engineering
  • Debuggers and browsers
  • Design Patterns

Introducing design patterns

  • The motivation for design patterns
  • Categories of patterns: creational, behavioral, and structural
  • Describing design patterns

Putting patterns to work

  • Synchronizing multiple views with the Observer pattern
  • Handling recursive data structures with the Composite pattern
  • Minimizing code duplication with the Template Method pattern
  • Managing object creation with the Singleton pattern
  • Decoupling object creation with Factory pattern
  • Separating algorithms from data structures with the Visitor pattern
  • Using the ISO Standard C++ Library

The Standard Template Library (STL)

  • The structure of the STL
  • Declaring and populating sequence and associative containers
  • Accessing containers using iterators
  • Applying standard and user-supplied algorithms
  • Using function object and lambda expressions

The iostream library

  • Basic input/output
  • Formatting textual output
  • Handling errors in input data
  • Wide character types and internationalization

The thread library

  • Creating and managing threads
  • Handling exclusive access to shared data
  • Storage Management

Managing memory

  • Recognizing and reducing memory overhead
  • Preventing memory leaks with the unique_ptr and shared_ptr templates
  • Overloading operator new and operator delete
  • Writing and using smart pointers

File storage

  • Preparing classes for simple file storage
  • Storing and retrieving objects using Boost serialization libraries
  • Writing Better C++

Increasing reusability

  • Avoiding name clashes using namespaces
  • Using templates for type-safe reusability

Improving robustness and efficiency

  • Strengthening encapsulation by consistent and appropriate use of const
  • Sharing state between lightweight objects
  • Understanding r-value references and move semantics
  • Avoiding C++ Traps and Pitfalls

Things you need to do — and why

  • Virtual destructors
  • Assignment operators and copy constructors

Features to handle with care

  • Friends vs. public members
  • Runtime-type information vs. virtual member functions
  • Multiple and virtual inheritance
Show complete outline
Show Less

Exclusive Private Team Training Course

Enhance your team's effectiveness and boost productivity with this course, delivered privately to your organization or to any preferred location, including options for hybrid or all-virtual delivery via AnyWare.

This training course could be customized, and combined with other courses, to meet the specific needs of your team's training.

Preferred method of contact:

Attendee Benefits

After-Course Instructor Coaching
When you return to work, you are entitled to schedule a free coaching session with your instructor for help and guidance as you apply your new skills.

After-Course Computing Sandbox
You'll be given remote access to a preconfigured virtual machine for you to redo your hands-on exercises, develop/test new code, and experiment with the same software used in your course.

Free Course Exam
You can take your Learning Tree course exam on the last day of your course or online any time after class.


Enhance Your Credentials with Professional Certification

Learning Tree's comprehensive training and exam preparation guarantees that you will gain the knowledge and confidence to achieve professional certification and advance your career.

Earn 23 Credits from NASBA

This course qualifies for 23 CPE credits from the National Association of State Boards of Accountancy CPE program. NOTE: Only live, in-class attendance qualifies for NASBA CPEs. Read more ...

Thanks to the course I took at Learning Tree, I’ve become more valuable in my current position and also more marketable.

- Q. Thompson, Contact Centre Designer
Orange Communications SA/AG

Chat Now

Please Choose a Language

Canada - English

Canada - Français