Skip to content

AriesRong/designPattern

Repository files navigation

designPattern

1.Strategy Pattern:

KeyWords

  • package
  • interface
  • abstract class

2.Observer Pattern:

KeyWords:

  • one to many
  • interface
  • abstract class
  • Subject
    • registerObserver(o)
    • removeObserver(o)
    • notifyObserver()
  • Observer
    • update()

3.Decorator Pattern

KeyWords:

  • Componet
    • ConcreteComponent
    • Decorator
      • ConcreteDecorator
  • virtual & abstract
  • base
  • inherit

4.Simple Factory Pattern

KeyWords:

  • swithch{case:default;}

Factory Pattern

KeyWords:

  • Product
    • ConcreteProduct
  • abstract Product factoryMthod(string type)
  • Creator(FactoryMthod:return Product)
    • ConcreteCreator(FactoryMthod:return Product)

Abstract Factory Pattern

KeyWords:

  • Product Family
  • AbstractFactory(return:AbstractProductA,AbstractProductB)
    • AbstractFactory1(return:AbstractProductA,AbstractProductB)
    • AbstractFactory2(return:AbstractProductA,AbstractProductB)
  • AbstractProductA
    • ProductA1
    • ProductA2
  • AbstractProductB
    • ProductB1
    • ProductB2

Releases

No releases published

Packages

No packages published

Languages