INFM 603
Information Technology and Organizational Context
Spring 2015
Assignment H3


In this assignment you will begin to explore the use of control structures in JavaScript. You will want to use the conditional statements (if-then-else) to make sure that the number that is entered has a reasonable value, and you will want to use a loop to rerun the same computation repeatedly, once for each year. The actual task, computing compound interests, is not really our focus (for that we would use a spreadsheet). So don't fixate on the math -- the goal here is to learn how to think about creating programs that perform a task using the three control structures that we discussed in class.

  1. Create a Web page with a JavaScript program that computes the future value of an investment that receives x% interest per year, where x is a non-negative integer entered by the user. The program should ensure that a non-negative integer is entered, and it should print out the future value for each of the next 10 years. You can assume that the investment's initial value is $10,000 (or any other reasonable value) or you can also ask the user to input an initial investment amount -- either way would be fine.
  2. Place this Web page in 603/hw3.html in your terpconnect Web space and link it from 603/index.html.

Doug Oard
Last modified: Wed Jan 14 20:19:23 2015