Oh, you know what? I just researched a bit more, and I think you might actually be right about it being a State machine anyway!

There's a very subtle difference. To really use the State pattern--and not State machine--I'd have to provide the state objects with the implementation.

In the case of C#, it'd probably be something like providing an Action to the state's constructor. In this way the Booking itself would provide the implementation, but the state object can determine what to do with it.



Engineering Manager | Big4 ex. FinTech | Writer with +1M views. Sharing my opinion & what I learn. YT channel youtube.com/c/NicklasMillard

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store