Partner: Yang Zikian
Partner Address:http://home.cnblogs.com/u/yzj666/
Functional Requirements:
1. The principal is 1 million, the interest rate or the return on investment is 3% and the investment period is 30, then the interest income obtained after 30 years is calculated by the formula of compounding interest: 1,000,000x (1+3%) ^30 2. If you follow simple interest calculation, how much is the principal and interest?
3. If a pension of $3 million is to be raised after 30, the average annual return is 3%, what is the amount of principal that must be invested now?
4. Interest rate is so low, compounding profits are so strong, if take 1 million yuan to buy annual rate of return 10% of the stock, if all smooth, too long, 1 million yuan becomes 2 million yuan?
5. If I want to turn $1 million into $2 million within 10 years, how much should I find the investment tool to help me achieve my goals? If you want to double the principal after 5 years, how much should the rate of return be at least?
6. If the savings of $30,000 are to be invested annually, with a return of 3% per annum, and then a new round of investment in these Benli and annuities, what will the total value of assets be after 30 years? What if we switch to 3000 a month?
7. Do you write programs that allow customers to operate at will? What is the reaction of accidentally entering data and accidentally doing unconventional operating procedures?
8. If a bank loan of 100,000 yuan, the annual interest rate of 6.5%, the term is 10, then the monthly equal and principal repayment amount? (For compounding conditions, inferior amount repayment amount)
Operation Result:
1. Seek the final value of compound interest
2. Simple interest Final value
3. Principal
4. Duration
5. Interest rates
6. Annuity End Value
7. Regular coupon Payments
8. Error message:
Code address
Https://github.com/G-Pride/code/tree/master/CompoundComputer
Main algorithms
Seeking interest rates
Ask for periodic interest
JUnit Test
Compound interest calculation and re-upgrade