Homework 2


40 pts., due Feb. 23

The solution you turn in should be word-processed.

  1. 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).



    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
Tom Kelliher