Skip to content

tarun91vas/design-patterns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Design pattern implementation

  • Setup gradle project: gradle init --type java-library

Patterns

  • strategy : Implementation of duck behavior using strategy pattern.
  • observer: Implementation of publish subscribe model.
  • decorator: Implementation of beverage class using decorator pattern. Wrapping up beverage type during run time.
  • factory: Implement a pizza store. A pizza factory which prepares variety of pizza.
  • singleton: An implmentation of singleton class to create unique instance.
  • command: On/Off remote control implementation using command pattern.
  • adapter: An adapter which adapts an enumeration to an iterator.
  • template: A class representing components of template pattern. There are different ways to implment this, only generic representation is shown.
  • iterator: Iterator implementation for aggregate types like Array, Map etc. Different types of data structure encapuslated internal implementation by implmenting an iterator.
  • composite: Implement tree structure print to demonstrate composition.

Reference

About

Common design pattern implementation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages