Study how the Observer or Strategy pattern is implemented in C++ before adding event handling or behavior switching to your own classes
Use the Singleton or Factory Method implementation as a starting template for your C++ project
Prepare for software engineering interviews by compiling and running all 23 pattern examples
Compare the same Gang of Four pattern side-by-side in C++, Java, and Python using the author's sibling repositories
Design patterns are named, reusable solutions to problems that come up repeatedly when writing object-oriented software. Rather than being code you copy directly, they are templates or blueprints that describe how to structure your classes and objects to handle a particular kind of problem. This repository provides C++ source code implementations of 23 classic patterns drawn from the well-known "Gang of Four" book and the Head First: Design Patterns book. The patterns are organized into three groups. Creational patterns deal with how objects are created: the Abstract Factory, Builder, Factory Method, Prototype, and Singleton patterns fall here. Structural patterns describe how classes and objects are combined into larger structures: Adapter, Bridge, Composite, Decorator, Facade, Flyweight, and Proxy. Behavioral patterns cover how objects communicate and share responsibility: Chain of Responsibility, Command, Interpreter, Iterator, Mediator, Memento, Observer, State, Strategy, Template Method, and Visitor. Each pattern has its own folder in the repository, containing a C++ implementation you can read, compile, and experiment with. The README itself is brief: it names each pattern with a short phrase describing what aspect of design it addresses, and links to the corresponding folder. There is no extended explanation of how each pattern works or when to use it beyond those short descriptions. The author also maintains companion repositories with the same patterns implemented in Java and Python. If you are learning design patterns or want to see how a specific pattern looks in C++ code alongside the theory from those reference books, this collection serves as a concise reference.
← jakubvojvoda on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.