tdle94 / VendingMachineSimulator

A program to simulate real life vending machine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VendingMachineSimulator Build Status

Initially the vending machine has 0 quarter, 0 dime and 0 nickle but you can manually change the value in Model.swift file

struct Model {
  ...
 
  private(set) var numberOfQuarter: Int = 0
  private(set) var numberOfDime: Int = 0
  private(set) var numberOfNickle: Int = 0
 
  ...
}

How to use

  • Insert coin
  • Select a product (if not enough coin then repeat step 1 or return changes)
  • Return changes to customers (vending machine might or might not have the appropriate changes. If it does not have the appropriate changes. Return changes to yourself and repeat step one)

How vending machine works

More on how vending machine works.

About

A program to simulate real life vending machine


Languages

Language:Makefile 67.9%Language:Swift 14.7%Language:Objective-C 10.2%Language:C 7.2%