DesignPatterns
Implementation of various design patterns in Java, Python and C++.
Install / Use
/learn @laxmena/DesignPatternsREADME
DesignPatterns
Implementation of various design patterns in C++, Java and Python.
This is an Open Source project created to serve as a Reference material. If you find this repository useful, do star the repository to show your support.
Strategy Pattern
Description: Strategy Pattern in implemented in a primitive VideoStreaming service, that automatically changes Streaming Strategy in run-time based on network speed of the client.
Observer Pattern
Description: A Digital News Agency and Subscriber has been designed to demonstrate the Observer pattern. Whenever there is a new news added to the NewsAgency(The Publisher/Observable), all its subscribers are notified.
Decorator Pattern
Description: Decorator pattern adds additional functionality to the existing classes. This pattern satisfies the Open-Close principle.
Coffee-Hut Example
Example Description: This example implements the Decorator Pattern to simulate a Coffee Shop billing system, where the users can customize the coffee with condiments in infinite possibilities.
Notification Channels Example:
Decorator Pattern is used to simulate a Notification system. The user can opt in for combination of multiple notification channels like SMS, Slack and Facebook along with the default Email notification channel.
Factory Method Pattern
Description:
Database Adapter Example
Example Description: Simple Database Adapter - implements Factory method. Makes use of Two Factories - one for SQL and another for NoSQL that helps create different Databases, and perform queries on them.
Abstract Factory Pattern
Description: Abstract Factory is a creational design pattern that lets us produce families of related objects without specifying their concrete classes. Definition Source.
Furniture Store Example
Example Description: Abstract Factory Pattern is implemented here with an example of a Furniture Store. We consider three different styles of furniture - Victorian, Modern and ArtDeco. Also, There are three furniture products in each style - Table, Chair and Sofa. Which essentially adds upto 9 products, and should be flexible to expand. Abstract Factory is implemented to approach this challenge.
If you have any feedbacks, comments or suggestions regarding this repository, please do let me know!
You can contact me through Email, LinkedIn or Twitter
I write Tech blogs and articles here: Medium and Personal Blog!
Related Skills
taskflow
354.2kUse when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layers like Lobster, ACPX, plugins, or plain code. Keep conditional logic in the caller; use TaskFlow for flow identity, child-task linkage, waiting state, revision-checked mutations, and user-facing emergence.
claude-opus-4-5-migration
112.2kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
112.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
Agent Development
112.2kThis skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
