This repository has been archived on 2022-11-20. You can view files and clone it, but cannot push or open issues or pull requests.
patterns/templatemethod/simplebarista/coffee.d

35 lines
513 B
D

module coffee;
import std.stdio : writeln;
class Coffee
{
void prepareRecipe()
{
boilWater();
brewCoffeeGrinds();
pourInCup();
addSugarAndMilk();
}
void boilWater()
{
writeln("Boiling water");
}
void brewCoffeeGrinds()
{
writeln("Dripping Coffee through filter");
}
void pourInCup()
{
writeln("Pouring into cup");
}
void addSugarAndMilk()
{
writeln("Adding Sugar and Milk");
}
}