[Tutor] Vending machine program

bob gailer bgailer at gmail.com
Fri Jan 4 18:47:22 CET 2013


On 1/4/2013 6:34 AM, Ghadir Ghasemi wrote:
> H I wanted to create a program called vending machine and I wondered if you could do it so I can find out how to do it.
> Here is how it should work like:
>
> A food vending machine accepts 10p, 20p, 50p and £1 coins.
> One or more coins are inserted and the current credit is calculated and displayed.
> A product is selected from those available. The system checks to see if there is enough credit to purchase the product chosen.
> If there is not enough credit the system displays an error message.
> If there is enough credit it dispenses the product, updates the credit available and displays the remaining credit.
> Further selections can be made if there is enough credit.
> The vending machine simulation should have five products and prices. Design, code, test and evaluate a program for this simulation.
Where did you get this assignment? What prior programming experience do 
you have?

As already mentioned we prefer to not do your work for you.

Further selections can be made if there is enough credit.

This is confusing. You could drop that line with no ill effect. I am not 
sure what it even means.

How far did you get in the steps suggested? Did you attempt a design?

-- 
Bob Gailer
919-636-4239
Chapel Hill NC



More information about the Tutor mailing list