WIP: Factory Method
Description
Factory method provides an interface for creating objects, but lets subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.
Real-life example
An example of the Factory method can be a hotel.
The person working at the front desk will give you a key to your room after you've paid for the room you want and this way he can be looked at as a "room" factory
While staying at the hotel, you might need to make a phone call, so you call the front desk and the person there will connect you with the number you need, becoming a "phone-call" factory, because he controls the access to calls, too.
Example
Let's imagine we have different loggers in our applications and based on
Last updated