Let's create an algorithm for baristas in the DrinkMaker class. It will choose a suitable cup, add ingredients, and pour liquid. Also, we'll inherit DrinkMaker to create highly specialized algorithms for tea and latte.
You must be signed in to leave a comment
8 March 2022, 14:43
1 April 2020, 14:58
10. The TeaMaker class's addIngredients method should display "Pour tea". 11. The TeaMaker class's pour method should display "Fill with boiling water". "Pour tea" should be in the pour() method, and "Fill with boiling water" should be in the addIngredients() method.
13 April 2020, 12:31
No, you are wrong.
13 April 2020, 21:31
so the Tea is just an ingredient in the TeaMaker? And when you pour from the TeaMaker, you just fill with boiling water? Whatever.
8 December 2020, 14:23
Lol, savage Roman.
6 September 2019, 13:10
I am not getting this, help me guys if you have done this
8 March 2022, 14:44
https://www.youtube.com/watch?v=aR1B8MlwbRI Derek Banas has a good video on the Template Pattern