Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

LinkedIn Learning

C++ Design Patterns: Creational

via LinkedIn Learning

Overview

Explore the five most popular creational design patterns for C++: Factory, Abstract Factory, Builder, Prototype, and Singleton.

Design patterns solve the challenges software developers face over and over again. They are reusable, proven solutions that make your software more reliable and flexible to change. Creational design patterns move the creation of objects out of the main codebase and into separate classes-a best practice known as encapsulation. This course explores the five most popular creational design patterns for C++. To convince you of their merits, instructor Olivia Chiu first explains why we use design patterns in the first place, and what problems that creational patterns can help you solve. She then reviews the core concepts, implementation instructions, and examples for each pattern: Factory, Abstract Factory, Builder, Prototype, and Singleton. She also shows how to extend patterns and compare patterns to find the best fit for your applications.

Syllabus

Introduction
  • Welcome
  • What you should know
  • Installing Visual Studio for Windows
  • Installing Visual Studio for Mac
  • How to use exercise files
  • Challenges explained
1. Design Patterns Overview
  • The need for a design pattern
  • What are design patterns?
  • Creational patterns overview
2. Creational Patterns
  • Inheritance vs. composition
  • Composite object example
  • Concrete vs. abstract
  • Understanding UML
3. Factory Method
  • Factory method concept
  • Factory method implementation
  • Running the Factory method example
  • Factory variations
4. Abstract Factory
  • Abstract Factory concept
  • Abstract Factory pattern implementation
  • Using the Abstract Factory
  • Running the Abstract Factory
  • Extending the Abstract Factory
  • Challenge
  • Solution
5. Builder
  • Builder concept
  • Builder pattern setup
  • Builder pattern implementation
  • Running the Builder example
  • Steps in the Builder pattern
6. Prototype
  • Prototype concept
  • Prototype pattern implementation
  • Running the Prototype example
  • Shallow copy vs. deep copy
7. Singleton
  • Singleton concept
  • Singleton implementation
  • Running the Singleton pattern
  • Is the Singleton a good pattern?
Conclusion
  • Comparing creational patterns
  • Next steps

Taught by

Olivia Chiu Stone

Related Courses

Reviews

Start your review of C++ Design Patterns: Creational

Never Stop Learning!

Get personalized course recommendations, track subjects and courses with reminders, and more.

Sign up for free