is it recommended when we add more number of language & CIty?
@gefirson9 ай бұрын
When you refactored to use ENUMS, you forgot the factory pattern. You've should have instantiated EnglandFactory/SpainFactory on your provider.
@campbelltech8 ай бұрын
You are right. I realized this and fixed in our Udemy course that is based on this video. Will have to update it here also.
@anurag34877 ай бұрын
I think we need to return the individual factories from the provider methods, and not the interfaces.
@thesandboxgamingvideos4 ай бұрын
Like this right ? IInternationalFactory internationalFactory = InternationalProvider.CreateCountry(Country.England); ILanguage language = internationalFactory.CreateLanguage(); ICapitalCity capitalCity = internationalFactory.CreateCapitalCity();