An open API service indexing awesome lists of open source software.

https://github.com/shaikrasheed99/factory-pattern

Implementation of Factory Pattern.
https://github.com/shaikrasheed99/factory-pattern

design-patterns factory-pattern java tdd tdd-java

Last synced: about 2 months ago
JSON representation

Implementation of Factory Pattern.

Awesome Lists containing this project

README

        

# Factory Pattern examples using Test Driven Development

## Example (Garage):

* There is an owner who is pretty much obsessed with different kinds of vehicles, he wants to buy as many vehicles as possible to store them in his garage.
* For that, he wants to visit a nearby vehicle store to buy a brand-new kind of vehicle every time.
* He likes all kinds of vehicles, but they should be differentiated with the number of wheels they have.
* So, he wants different types of vehicles with different values of wheels.

## Class Diagram:

![](class-diagrams/factory-pattern.png)