Handshake Interview Question

Describe a vending machine through code.