problemset2

# problemset2 - Introduction to Computers and Engineering...

This preview shows pages 1–2. Sign up to view the full content.

Introduction to Computers and Engineering Problem Solving 1.00 / 1.001 Fall 2005 Problem Set 2 Due: 11AM, Friday September 23, 2005 Banking & Investment [100 points] Introduction Since the stock markets and other types of investment are relatively difficult to model, we’ll be modeling investments as bank accounts. For the purposes of this problem set, we’ll assume there are only three types of investment accounts, tabulated below. Investment Type TYPE 1 TYPE 2 TYPE 3 Minimum Investment \$0 \$3,000 \$5,000 Minimum Investment Period No limit 60 months (5 years) No limit Withdrawal Limit No limit \$2,000 No limit Withdrawal Penalties No penalties \$500 No penalities A TYPE 1 account has a monthly interest rate of 0.2466% (3% annually). For TYPE 2 accounts, the interest rate varies with the age of the account, as shown below. Account Age in months 0 – 12 13 – 36 37 to 60 > 60 Monthly Rate (Yearly Rate) 0.1162% (2%) 0.2060% (2.5%) 0.2871% (3.5%) 0.4074% (5%) The rate for TYPE 3 accounts is a random number between 0% and 0.7974% monthly (10% annually) and changes at the beginning of each month. To generate a random number (double) greater than or equal to zero, but less than 1, use Math.random() . For example, the code fragment below generates a random number greater than or equal to 2, but less than 6. double rand = 2 + 4 * Math.random();± For all account types, the interest is calculated at month-end on the total value of the investment. The interest is added to the total value of the investment.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern