Search:

Type: Posts; User: white97

Search: Search took 0.16 seconds.

  1. Replies
    10
    Views
    1,647

    Re: Help with run time error

    I figured it out. Thanks for your help!
  2. Replies
    10
    Views
    1,647

    Re: Help with run time error

    The nbrTimesAround would be the same as the variable though. My method to put the parameters into is invest.getFutureValue(numberOfYears, numberOfTimes). So if I wrote it like you said it would have...
  3. Replies
    10
    Views
    1,647

    Re: Help with run time error

    Yes it should change. If the user inputs number of years as 10 then it should display values 1-10 in numberOfYears in my algorithm, so:

    algorithm -- principal * Math.pow((1 + interestRate /...
  4. Replies
    10
    Views
    1,647

    Re: Help with run time error

    So even with a loop, I need to pass numberOfYears and numberOfTimes to it every time?
  5. Replies
    10
    Views
    1,647

    Help with run time error

    My algorithm method in another class is

    public double getFutureValue(int numberOfYears, int numberOfTimes)
    {
    return principal * Math.pow((1 + interestRate / numberOfTimes), (numberOfYears *...
Results 1 to 5 of 5