Template pattern

  • 8
  • Locked
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 can't complete this task, because you're not signed in.
Comments (7)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Andrew Evans
Level 17 , San Jose, Canada
8 March 2022, 14:43
Good task
Level 25
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.
Level 41
13 April 2020, 12:31
No, you are wrong.
Level 25
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.
Level 41
8 December 2020, 14:23
Lol, savage Roman.
Payal Agarwal
Level 17 , Bucharest, Romania
6 September 2019, 13:10
I am not getting this, help me guys if you have done this
Andrew Evans
Level 17 , San Jose, Canada
8 March 2022, 14:44
https://www.youtube.com/watch?v=aR1B8MlwbRI Derek Banas has a good video on the Template Pattern