Packt

Behavioral Design Patterns in C++

Packt

Behavioral Design Patterns in C++

Gain insight into a topic and learn the fundamentals.
Intermediate level

Recommended experience

2 weeks to complete
at 10 hours a week
Flexible schedule
Learn at your own pace
Gain insight into a topic and learn the fundamentals.
Intermediate level

Recommended experience

2 weeks to complete
at 10 hours a week
Flexible schedule
Learn at your own pace

What you'll learn

  • Gain a deep understanding of behavioral design patterns in C++ and how they improve code maintainability.

  • Learn how to implement design patterns such as Strategy, Command, Memento, and others to solve real-world programming challenges.

  • Understand how to apply patterns for optimizing multi-threading, undo/redo mechanisms, and thread-safety in C++ applications.

  • Refactor legacy systems by incorporating design patterns to enhance flexibility, scalability, and code quality.

Details to know

Shareable certificate

Add to your LinkedIn profile

Recently updated!

February 2026

Assessments

14 assignments

Taught in English

See how employees at top companies are mastering in-demand skills

 logos of Petrobras, TATA, Danone, Capgemini, P&G and L'Oreal

There are 13 modules in this course

In this module, we will introduce the course structure and explain the key benefits of learning behavioral design patterns in C++. You'll get an overview of the fundamental concepts and how they directly apply to real-world software development. By the end, you’ll have a clear understanding of what to expect and how this course will help you enhance your coding proficiency.

What's included

1 video1 reading

In this module, we will cover the basics of design patterns, class diagrams, and behavioral design patterns. You’ll understand the foundational concepts that underpin many software development practices and how these patterns facilitate creating efficient and scalable solutions. This module is essential for building the groundwork before diving deeper into specific patterns.

What's included

3 videos1 assignment

In this module, we will delve into the strategy pattern and how it can be implemented to manage algorithms in a flexible way. Through hands-on examples like spreadsheet applications and dynamic arrays, you will learn how to refactor your code to make it more maintainable and extensible. We’ll also cover advanced variations like static strategy and function strategy for efficient runtime decision-making.

What's included

17 videos1 assignment

In this module, we will introduce the template method pattern and show you how to use it to define the skeleton of an algorithm in a base class while leaving the implementation of specific steps to subclasses. You’ll get hands-on experience applying the pattern to real-world examples, such as document frameworks, and learn how it improves code reusability and maintainability.

What's included

9 videos1 assignment

In this module, we will explore the command pattern, focusing on how it can decouple sender and receiver objects. By working through examples like text editors and logging systems, you’ll learn to implement command objects for managing user input and actions like undo/redo. This pattern is essential for creating flexible and extensible software applications.

What's included

23 videos1 assignment

In this module, we will cover the memento pattern and demonstrate how it allows you to store and restore an object’s state without exposing its internal structure. Through examples like banking applications and games, you’ll learn how to effectively implement memento for state management, providing a mechanism for undo/redo functionality and preserving the state of complex systems.

What's included

10 videos1 assignment

In this module, we will explore the chain of responsibility pattern and its ability to decouple request senders from receivers. We’ll apply the pattern to real-world examples like help systems and logging systems, where requests are passed along a chain of handlers. This approach simplifies request processing by allowing multiple handlers to take action without direct dependencies.

What's included

9 videos1 assignment

In this module, we will dive into the observer pattern, which enables objects to notify others about state changes. Through examples like alarm systems and sensor applications, you’ll learn how to use this pattern to create loosely coupled systems where one object’s change in state automatically triggers updates in other objects. This is crucial for building reactive systems.

What's included

12 videos1 assignment

In this module, we will explore the mediator pattern, which simplifies interactions between objects by introducing a mediator that controls communication. By working through examples like chat systems and dialog boxes, you will understand how this pattern reduces the complexity of object interactions and helps manage dependencies more effectively.

What's included

9 videos1 assignment

In this module, we will focus on the visitor pattern, which allows you to add new operations to an object structure without changing the classes themselves. Using shape hierarchies and operations like rendering, you’ll learn how to extend functionality while maintaining the flexibility of your system. We’ll also introduce concepts like acyclic visitors and C++17 std::variant.

What's included

14 videos1 assignment

In this module, we will cover the interpreter pattern, which helps interpret complex expressions in specific domains. Through examples like Boolean evaluators and reverse Polish notation (RPN) systems, you’ll learn how to define grammars and use interpreters to parse and evaluate expressions, making it easier to implement domain-specific languages and evaluation engines.

What's included

10 videos1 assignment

In this module, we will focus on the state pattern, which allows an object to alter its behavior based on its internal state. Through examples like a lamp with multiple states and transition tables, you’ll learn how to implement the state pattern for managing state changes. This pattern simplifies handling state-dependent behavior and reduces complexity in your code.

What's included

14 videos1 assignment

In this module, we will explore the iterator pattern, which provides a way to access the elements of a collection sequentially without exposing its underlying structure. You’ll implement iterators for various containers, including arrays and linked lists, and understand how iterators help create flexible and reusable code for collection traversal. This module also covers C++ iterators and smart pointers for advanced usage.

What's included

14 videos3 assignments

Instructor

Packt - Course Instructors
Packt
1,471 Courses 392,127 learners

Offered by

Packt

Why people choose Coursera for their career

Felipe M.

Learner since 2018
"To be able to take courses at my own pace and rhythm has been an amazing experience. I can learn whenever it fits my schedule and mood."

Jennifer J.

Learner since 2020
"I directly applied the concepts and skills I learned from my courses to an exciting new project at work."

Larry W.

Learner since 2021
"When I need courses on topics that my university doesn't offer, Coursera is one of the best places to go."

Chaitanya A.

"Learning isn't just about being better at your job: it's so much more than that. Coursera allows me to learn without limits."
Coursera Plus

Open new doors with Coursera Plus

Unlimited access to 10,000+ world-class courses, hands-on projects, and job-ready certificate programs - all included in your subscription

Advance your career with an online degree

Earn a degree from world-class universities - 100% online

Join over 3,400 global companies that choose Coursera for Business

Upskill your employees to excel in the digital economy

Frequently asked questions