Code a bean-to-cup coffee machine (heating, grinding, brewing; half a cup, cup and so on).