Grokking the Object Oriented Design Interview
Vote

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 shop assistant. 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 elsewhere does not save either of them.

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content