Conversion to Class

I converted the original file into two classes, CoinMachine and
VendingMachine. It now successfully does what it is meant for it to do.
Some debugging and tweaking will be required.