Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
View all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
Accelerator
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Type
/
to search
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
premaseem
/
DesignPatternsJava9
Public
Notifications
You must be signed in to change notification settings
Fork
165
Star
81
Code
Issues
0
Pull requests
27
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Factory Design Pattern
- #28
#28
Open
premaseem
wants to merge 9 commits into
develop
premaseem/DesignPatternsJava9:develop
from
factory
premaseem/DesignPatternsJava9:factory
Copy head branch name to clipboard
Conversation
Commits
9
(9)
Checks
Files changed
Open
Factory Design Pattern
#28
premaseem
wants to merge 9 commits into
develop
premaseem/DesignPatternsJava9:develop
from
factory
premaseem/DesignPatternsJava9:factory
Copy head branch name to clipboard
Commits
Commits on Jan 31, 2018
Step 1: Factory pattern - Before code ( poor code )
premaseem
committed
8e41ad8
View commit details
Copy full SHA for 8e41ad8
Browse repository at this point
Step 2: Abstract Ice cream interface (Generalize it)
premaseem
committed
f5ca54c
View commit details
Copy full SHA for f5ca54c
Browse repository at this point
Step 3: Create Ice cream factory
premaseem
committed
79d3940
View commit details
Copy full SHA for 79d3940
Browse repository at this point
Step 4: update client and consume factory to make code loosely coupled, reusable and centralized
premaseem
committed
69fa158
View commit details
Copy full SHA for 69fa158
Browse repository at this point
Step 5: Lesson Learnt :-)
premaseem
committed
dfc8e4e
View commit details
Copy full SHA for dfc8e4e
Browse repository at this point
Final touch - converted factory method as static
premaseem
committed
50fc6fd
View commit details
Copy full SHA for 50fc6fd
Browse repository at this point
Bonus Pattern of Pizza factory
premaseem
committed
e29ffd1
View commit details
Copy full SHA for e29ffd1
Browse repository at this point
Commits on Aug 5, 2018
added uml diagram
premaseem
committed
37c4973
View commit details
Copy full SHA for 37c4973
Browse repository at this point
Commits on Aug 8, 2018
update readme.md
premaseem
committed
edc9209
View commit details
Copy full SHA for edc9209
Browse repository at this point
You can’t perform that action at this time.