Design pseudocode to control a soda machine. (As an aside, why
wouldn't we refer to this pseudocode as an algorithm?) The machine
stocks 4 kinds of soda: Coke (50 cents), Diet Coke (50 cents), root beer
(65 cents --- it's really good stuff), and Mountain Dew (40 cents,
the favorite of hackers).
Inputs:
- Coins: nickels, dimes, quarters
- Button pushes, corresponding to the 4 kinds of soda
- Indications from the four soda compartments as to whether or not each
one is empty
Outputs:
- A soda (possibly)
- Change (possibly)
I want you to do the requirements specification, analysis, and design steps
for this problem. Your design is the most important part. Your pseudocode
design should demonstrate top-down stepwise refinement.