Factory pattern encapsulates the implementation details and underlying implementation can be changed without any impact on caller api.