I'm a broke high school student and I'm also materialistic. If I wanted something, I would get it but I won't be able to pay in full, therefore I play monthly with a rate to my dad - this seems fair I guess. If I were to do this, I would want to know, what I have to pay each much and for how long. Therefore I created this calculator on Java. All it asks is the Present Value (PV), the rates(r), and the number of payments in years (can be decimal if it's less than a year). It then asks the user for monthly and yearly. Please note, the answer will be given once you stop and exit the program. This allows you to put as many payments as you want, it will print out the result in an order. This program was build using Java language in NetBeans for a school project. Since I was not able to use the math method, I had to make my own power method. The challenge that I face was calculating if the interest rate is 0, as my general code, I just put in the formula, and anything that times a 0 is zero, therefore every time I put a 0 as a rate, the result would come out as zero. I managed to fix this by creating an if statement and putting a different formula for it:

    if (ratesPercent[i] == 0)
    {
      result[i] = PaymentRates.ratesZero(presentValue[i], numberPaymentMonth[i]);
    }

I managed to finish this program in the timeframe of two weeks and submitted it working perfectly. What I've learned is that I should take my pseudocode seriously as the problem with rate = 0 could have been spotted earlier on. I could have also tested the code with a zero before letting people try my code. ** It's fixed now.** My payment Rates Calculator will stay as it is, unbothered, but I might use the code to create a JFrame version of it to make it more presentable. For now, it is just a simple Java code.

I also added a test code

Built With

Share this project:

Updates