This is a prototype of a Vending Machine. It's a State Machine
which:
- Accepts coins of 0.05€, 0.10€, 0.20€, 0.50€, 1€, 2€
- Allow user to select products Coke(1.50€), Sprite(1.45€), Water(0.90€)
- Allow user to take refund by canceling the request.
- Return selected product and remaining change if any
- Allow reset operation (amount of product stock & change) for vending machine supplier.
- doesn't use database, the state is saved in memory
- It uses the minimum number of external libraries (except for testing libraries, use as many as you usually do)
- It's framework agnostic
- Can mantain the state
- Exposes clearly the methods that provide the functionality
- It is easy to understand, test, reuse, evolve and maintain.