Background
In this project you will implement an object-oriented design that simulates a vending machine that dispenses different types of (old-fashioned) coffee as well as chicken bouillon. Since this is our first project using an object-oriented design, it will be a console app to keep things as simple as possible.
Here is a sample execution of the console program (user input is in bold type):
python coffee.py
______________________________________
PRODUCT LIST: all 35 cents, except bouillon (25 cents)
1=black, 2=white, 3=sweet, 4=white & sweet, 5=bouillon"
Sample commands: insert 25, select 1.
>>> Your command: select 1
Sorry. Not enough money deposited.
______________________________________
PRODUCT LIST: all 35 cents, except bouillon (25 cents)
1=black, 2=white, 3=sweet, 4=white & sweet, 5=bouillon"
Sample commands: insert 25, select 1.
>>> Your command: insert 1
INPUT ERROR >>>
We only take half-dollars, quarters, dimes, and nickels.
Coin(s) returned.
______________________________________
PRODUCT LIST: all 35 cents, except bouillon (25 cents)
1=black, 2=white, 3=sweet, 4=white & sweet, 5=bouillon"
Sample commands: insert 25, select 1.
>>> Your command: insert 35
INPUT ERROR >>>
We only take half-dollars, quarters, dimes, and nickels.
Coin(s) returned.
______________________________________
PRODUCT LIST: all 35 cents, except bouillon (25 cents)
1=black, 2=white, 3=sweet, 4=white & sweet, 5=bouillon"
Sample commands: insert 25, select 1.
>>> Your command: Hi!
Invalid command.
______________________________________
PRODUCT LIST: all 35 cents, except bouillon (25 cents)
1=black, 2=white, 3=sweet, 4=white & sweet, 5=bouillon"
Sample commands: insert 25, select 1.
>>> Your command: insert 25
Depositing 25 cents. You have 25 cents credit.
______________________________________
PRODUCT LIST: all 35 cents, except bouillon (25 cents)
1=black, 2=white, 3=sweet, 4=white & sweet, 5=bouillon"
Sample commands: insert 25, select 1.
>>> Your command: insert 10
Depositing 10 cents. You have 35 cents credit.
______________________________________
PRODUCT LIST: all 35 cents, except bouillon (25 cents)
1=black, 2=white, 3=sweet, 4=white & sweet, 5=bouillon"
Sample commands: insert 25, select 1.
>>> Your command: insert 5
Depositing 5 cents. You have 40 cents credit.
______________________________________
PRODUCT LIST: all 35 cents, except bouillon (25 cents)
1=black, 2=white, 3=sweet, 4=white & sweet, 5=bouillon"
Sample commands: insert 25, select 1.
>>> Your command: select 1
Making black:
Dispensing cup
Dispensing coffee
Dispensing water
Returning 5 cents.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
27 | 28 | 29 | 30 | 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |