Skip to content

A interview task to implement a vending machine.

Notifications You must be signed in to change notification settings

danaketh/exercise_vending-machine

Repository files navigation

Tests Code Quality

Vending Machine

A interview task for a software engineer position. Implement a vending machine in PHP which:

  • accepts coins of 1,5,10,25,50 Cents and 1 Dollar.
  • allows user to select product.
  • returns selected product and remaining change (if any) in as little coins possible.

I've added some extra features:

  • press reset to return all coins in the machine.

Implementation notes

The vending machine is implemented as an interactive CLI command. Coins are represented as integers, where 100 is 1 dollar.

About

A interview task to implement a vending machine.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published