How starshubham/creationaldesignpatterns works
This repository is a console demonstration of five creational design patterns. A user selects a pattern in the menu, and Program runs that example through its result: logging, a payment, rendered UI controls, a displayed employee, or a cloned employee. The diagram preserves each pattern as a separate branch and shows the main creation and invocation boundaries. Evidence is limited to the supplied source excerpts; README-described capabilities without sampled implementation details are shown only where the tree supports them.
Main entry points: Program.cs Pattern menu · FactoryMethod.cs Payment factory · EmployeeBuilder.cs Employee builder · PEmployee.cs Prototype employee
Components 14
Console entry
- Pattern menu
CreationalDesignPatterns/Program.cs
Singleton
- Logger
CreationalDesignPatterns/Singleton/Logger.cs
Factory method
- Payment factory
CreationalDesignPatterns/Factory/FactoryMethod.cs - Payment contract
CreationalDesignPatterns/Factory/Interfaces/IPayment.cs - Payment methods
CreationalDesignPatterns/Factory/Services
Abstract factory
- UI factory contract
CreationalDesignPatterns/AbstractFactory/Interfaces/IUIFactory.cs - Platform factories
CreationalDesignPatterns/AbstractFactory/Services - Control contracts
CreationalDesignPatterns/AbstractFactory/Interfaces - Platform controls
CreationalDesignPatterns/AbstractFactory/Services
Object construction
- Employee builder
CreationalDesignPatterns/Builder/EmployeeBuilder.cs - Employee
CreationalDesignPatterns/Builder/Employee.cs - Prototype contract
CreationalDesignPatterns/Prototype/IPrototype.cs - Prototype employee
CreationalDesignPatterns/Prototype/PEmployee.cs
Other components
- Console user
Connections 17
- Console user → Pattern menu: chooses pattern
- Pattern menu → Logger: gets instance
- Pattern menu → Logger: logs message
- Pattern menu → Payment factory: requests payment
- Payment factory → Payment methods: creates method
- Payment factory → Payment contract: returns contract
- Pattern menu → Payment methods: invokes payment
- Pattern menu → Platform factories: selects factory
- Platform factories → Control contracts: creates controls
- Pattern menu → Control contracts: renders controls
- Pattern menu → Employee builder: sets fields
- Pattern menu → Employee builder: builds employee
- Employee builder → Employee: returns employee
- Pattern menu → Employee: displays employee
- Pattern menu → Prototype employee: clones employee
- Prototype employee → Prototype contract: implements
- Pattern menu → Prototype employee: displays copies