Get available coins from the bank // this will be an array of coin values and quantities Give available coins to the banker // this will return either a list of coins or error If not error tell the banker to reset amount to 0 while (there are coins in the list of coins) get coin from bank give coin to output else give error message to output.
Ask soda bin id for price of top soda (sodaPrice) Ask banker for amount deposited (amount) if (amount >= sodaPrice) Ask soda bin id for top soda (can) Give can to output Tell banker to deduct soda price Do CoinPressReturn else Give "insufficient funds", price, amount to output
Tell banker to add the amount of the money Give money to bank