DigestCPP

Lets Understand With Example

  • Home
  • Design Patterns
  • Adapter Design Pattern
  • Strategy Design Pattern
  • C++11 Features
  • std::thread c++11
  • Contact Us

Factory Method Design Pattern

Factory Design Pattern define an interface for creating an object but let subclass decide which class to instantiate. Subclass will create a object. This design pattern comes under creational design pattern.

Class Diagram:

Class Diagram of Factory Pattern:

Class Diagram of Real Example:

Click here to see source code of above example in c++

Primary Sidebar

Copyright © 2021

  • Contact us