Forums - C# Corner

Forum guidelines
Dee Walker

Dee Walker

  • 1.6k
  • 38
  • 1.4k

Need Assistance on Program

Nov 10 2017 9:09 AM
I need help getting started on a program I'm completely lost. I don't need the answer to the program, I need help learning how to do what is asked. Here is the criteria:
Create and test a Windows Forms application that applies the Net Present Value formula from Finance to calculate how much money you need to invest today to earn a certain amount in the future. Your form will gather inputs for the future value (F), the annual interest rate (r) - expressed as a floating point value (like 0.05 for 5%), and the number of years in the future (n) that interest will compound. Your application will calculate the present value (P) that you'd need to invest today to earn the desired amount of money in the future. To avoid cumbersome type conversions, make all of your variables of type double and int (number of years).
You must implement the calculation for present value by writing a value-returning method named CalcPresentValue based on the formula below. The method will return a double and will accept three parameters, the future value (a double), the annual interest rate (a double), and the number of years (an int). You may make the method public and static if you like. Be sure to include precondition and postcondition comments for each method, including event handlers. These comments are now required.
Recall, the method Math.Pow is used to raise a number to an exponent. You will need to use this method to calculate the denominator in the equation above.
Remember, don't send send me a finished program. I want to learn how to do this for the future. I am having trouble starting.

Answers (2)


Build smarter apps with Machine Learning, Bots, Cognitive Services - Start free.

Start Learning Now