Design a Vending Machine

Medium
Company: Premium
GoogleAmazonUber

Design a vending machine. The vending machine should allow a user to:

  • Select a product from a list of available products.
  • Insert money into the vending machine.
  • Receive the selected product if enough money has been inserted.
  • Receive any change due after a successful purchase.
  • Cancel the transaction and receive a refund of the inserted money.
  • The vending machine should also allow an administrator to:
    • Add new products to the vending machine.
    • Restock existing products.
    • Withdraw money from the vending machine.
    • Set product prices.

Requirements

Think like an Architect

Before revealing the requirements, imagine you're in the interview right now."How would you clarify the scope with your interviewer?"

Premium Content

View detailed solutions.

UNLOCK PREMIUM