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 things are allowed to happen in. A machine that takes money before anything is selected, or dispenses twice for one payment, is broken no matter how clean the rest of the code is.

System Requirements

We will focus on the following set of requirements while designing the vending machine:

1

.....

.....

.....

Like the course? Get enrolled and start learning!