This is an exercise for Professor Oliver Yu's course, "Computer-Based Decision Models" in Santa Clara University's MBA program.
Copyright 2009 by Dylan Salisbury. If you have any comments or you want to re-use this for any reason, just send me a mail at dylan@dylansalisbury.com or add a comment here.
Want to run this without being on the Internet? Just save it to a local file on your computer first. Right-click here and choose Save Link As. The program is written in JavaScript so all the computation is done by your web browser.