๐ต Tea
โ Coffee
โถ prepare()
โบ Reset
HotDrink.prepare()
ยท final โ order locked
1
boilWater()
๐ฉ fixed in HotDrink
โผ
2
brew()
filled by subclass
abstract โ pick a subclass
โผ
3
pourInCup()
๐ฉ fixed in HotDrink
โผ
4
addExtras()
filled by subclass
hook
abstract โ pick a subclass
hook: wantsExtras()
the cup
ยท
empty
One skeleton, two drinks
Pick
๐ต Tea
or
โ Coffee
โ the skeleton stays put; only the dashed steps get filled.
โธ
Pick a drink, run
prepare()
, then untick the
hook
on step 4 and run again.