A post very interesting! I enjoyed reading it, but I have a little doubt
In the second design patter(Abstract Factory) you create the class DrinkFactory with the method prepare, and this method is never used why do you created it then?
Thanks Alberto for this observation.
But it's kind of an extension of functionality if you want to use. Though i have not used it in example, but it can give you an idea that how you can customize the behaviour with base methods which can be applied to all the factories that extends base class.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi Ravi đź‘‹
A post very interesting! I enjoyed reading it, but I have a little doubt
In the second design patter(Abstract Factory) you create the class DrinkFactory with the method prepare, and this method is never used why do you created it then?
Many thanks =)
Thanks Alberto for this observation.
But it's kind of an extension of functionality if you want to use. Though i have not used it in example, but it can give you an idea that how you can customize the behaviour with base methods which can be applied to all the factories that extends base class.