40 pts., due Feb. 23
The solution you turn in should be word-processed.
- 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).
- 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
- 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.
Thomas P. Kelliher
Wed Feb 14 16:33:13 EST 1996