Grokking the Object Oriented Design Interview
0% completed
Design a Vending Machine
Let's make an object-oriented design for a vending machine.
A vending machine sells small items without a store clerk. The customer picks a slot, pays, and takes the product from a tray at the bottom.
It looks simple, and that is exactly why interviewers use it. The whole question is about the order in which things are allowed to happen. A machine that takes money before anything is selected is broken. So is a machine that dispenses twice for one payment. Clean code in the rest of the design does not fix either problem.
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%