Please help I need help with this homework.
Its about vending machines, and it should be a piece of cake to you code experts out there.
Its about vending machines. Heres the question:
It should have two classes, one for the vending machine(VM) and the other for drinks. The capacity of the VM is specified on creation. The drinks can be added after this. VM just created should have no drinks. These drinks are stored in slots and are numbered. Only these specified coins can be accepted: 10, 50 cents and 1 dollar. VM should have no coins when created. The VM should let the user know how much the VM currently has and should be displayed as e.g. $1.05. The VM should allow the user to be able to abort and the VM should refund the money if it has not given any drinks. The VM should display what coins will be used for the refund. This program should not allow runtime errors.
Please note that the answer to this should be very simple and basic as we have covered only the very basic stuff, since this is only an introductory course. The answer will be of no use to me if it isn't solved in a basic manner.
Thanks in advance. I really appreciate any assistance available as I'm afraid I'll fail the course. Whats upsetting is that we have not been prepared enough to solve such a question, yet we are being asked.
Regards,
John