C++ Design Patterns: Behavioral
3h 30mIntermediate2021-06-09
Authors

Shaun Wassell
Full-Stack Software Developer
Course details
Programmers spend much of their time solving problems, yet they may wind up solving the same problems over and over again. In C++, design patterns can help programmers save their valuable time with classes of programming problems that have similar solutions. Once developers learn these patterns, they can write software more efficiently and make more deliberate software designs. In this course, instructor Shaun Wassell goes in-depth on behavioral design patterns. Shaun begins by explaining design patterns in general and behavioral design patterns in particular. For each behavioral design pattern discussed in this course, he covers the basic idea behind the pattern, what the pattern looks like in code, some real-world examples of how you could use the pattern, and the pattern’s benefits and tradeoffs. Shaun concludes by showing you how some of these behavioral patterns can be combined and some of the benefits and drawbacks of doing so.
Skills covered
C++Software DesignProgramming LanguagesOpen SourceSoftware DevelopmentDeep Dive (X:Y)One-Off
Concepts
0. Introduction
- 01 - Behavioral patterns improve software design
- 02 - What you should know
1. Introduction to Design Patterns
- 03 - What are design patterns
2. Behavioral Patterns Group 1
- 04 - The Chain of Responsibility pattern
- 05 - Implementing the Chain of Responsibility pattern
- 06 - Create Chain of Responsibility handlers
- 07 - The Command pattern
- 08 - Implementing the Command pattern
- 09 - Increasing code reuse with commands
- 10 - The Mediator pattern
- 11 - Implementing the Mediator pattern
- 12 - Using the Mediator from inside other classes
- 13 - The Observer pattern
- 14 - Creating publishers
- 15 - Creating subscribers
- 16 - Project - Create a group-chat program
- 17 - Challenge - Apply the Command pattern
- 18 - Solution - Apply the Command pattern
3. Behavioral Patterns Group 2 - Strategies, States, and Interpretations
- 19 - The Interpreter pattern
- 20 - Implementing the Interpreter pattern
- 21 - Applying the Interpreter pattern
- 22 - The State pattern
- 23 - Implementing the State pattern
- 24 - Applying the State pattern
- 25 - The Strategy pattern
- 26 - Creating strategies
- 27 - Rewriting classes to use strategies
- 28 - The Template Method pattern
- 29 - Creating template methods
- 30 - Modifying templates using subclasses
- 31 - The Visitor pattern
- 32 - Implementing visitors
- 33 - Allowing classes to accept visitors
- 34 - Project - Create a greeting-card generator program
- 35 - Challenge - Modifying the card generator
- 36 - Solution - Modifying the card generator
4. Behavioral Patterns Group 3
- 37 - The Iterator pattern
- 38 - Implementing the Iterator pattern
- 39 - Using iterators
- 40 - The Memento pattern
- 41 - Creating a Memento class
- 42 - Using Memento classes
- 43 - The Null Object pattern
- 44 - Creating Null Object classes
- 45 - Setting null objects as the default
- 46 - Project - Create an instant replay program
- 47 - Challenge - Apply the Null Object pattern
- 48 - Solution - Apply the Null Object pattern
Conclusion
- 49 - Next steps