A few years ago, I was interviewing with a Tech major & was asked to design a Vending Machine in one of the rounds. Back then, I had less experience with practical software design & didn’t find time to cram the ‘Gang of Four Design Patterns’ book.
Get smarter at building your thing. Follow to join The Startup’s +8 million monthly readers & +760K followers.
System Design Mock Interview: Design a Vending Machine
Get smarter at building your thing. Follow to join The Startup’s +8 million monthly readers & +760K followers.
A few years ago, I was interviewing with a Tech major & was asked to design a Vending Machine in one of the rounds. Back then, I had less experience with practical software design & didn’t find time to cram the ‘Gang of Four Design Patterns’ book.
FAQ
Which design pattern is used in vending machine?
- Vending Machine class. It has cash, items fields to store the current state of the machine. Also it should have currentBalance, currentItem fields.
- Item class. To store items to be sold. …
- Bills class. To store bill type.
- … Maybe draw whatever you think of and leave it for interviewer’s reference.
What class can vending be used?