Explore the five most popular creational design patterns for C++: Factory, Abstract Factory, Builder, Prototype, and Singleton.
Overview
Syllabus
Introduction
- Organize your code with creational design patterns in C++
- What you should know
- Installing Visual Studio for Windows
- Installing Xcode on Mac
- How to use the exercise files
- Challenges in this course
- The need for a design pattern
- What are design patterns?
- Creational patterns overview
- Inheritance vs. composition
- Composite object example
- Concrete vs. abstract
- Understanding UML
- Factory Method concept
- Factory Method implementation
- Running the Factory Method example
- Factory Method variations
- Abstract Factory concept
- Abstract Factory pattern implementation
- Using the Abstract Factory
- Running the Abstract Factory
- Extending the Abstract Factory
- Challenge: Abstract Factory
- Solution: Abstract Factory
- Builder concept
- Builder pattern setup
- Builder pattern implementation
- Running the Builder example
- Steps in the Builder pattern
- Prototype concept
- Prototype pattern implementation
- Running the Prototype example
- Shallow vs. deep copies
- Singleton concept
- Singleton pattern implementation
- Running the Singleton pattern
- Is the Singleton a good pattern?
- Comparing creational patterns
- Thanks for watching
Taught by
Olivia Chiu Stone