Skip to content

akormous/design-patterns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Design Patterns


A collection of C++ projects implementing various object-oriented design patterns.

How to run a project?

Go to the projects directory (i.e. ./Code/ObserverPattern)

  • install.sh : compile and build
  • run.sh : run the binary

Compile and Build

cd ./Code/ObserverPattern
source install.sh

Run

source run.sh

Index

Creational patterns

These patterns provide object creation mechanisms, which increase flexibility and reuse of existing code.

Theory Code
Factory Pattern Domino's Pizza
Singleton Pattern Chocolate Factory

Structural patterns

These patterns explain how to assemble objects and classes into larger structures while keeping these structures flexible and efficient.

Theory Code
Decorator Pattern Starbucks Coffee
Adapter Pattern Turkey and Duck
Facade Pattern -
Composite Pattern Diner Menu and Sub-Menus

Behavioral patterns

These patterns are concerned with algorithms and the assignment of responsibilities between objects.

Theory Code
Strategy Pattern Duck Simulator
Observer Pattern Weather Station
Command Pattern Remote Control
Iterator Pattern Pancake and Diner Menu
Template Pattern Coffee and Tea
State Pattern Gumball Machine