Hey, I was doing the Cola Machine exercise by Blitz Coder and I just wanted to ask if this was a good way to do it or are there more efficient / better ways?
You started your question too broadly.
Is the last sentence a narrower version of the first, or the two are unrelated and you really want to know if there's "a good way to program"?
As for the switch, no. It's god-awful. All the cases do exactly the same.