Search:

Type: Posts; User: white97

Search: Search took 0.14 seconds.

  1. Replies
    1
    Views
    1,098

    Simple question

    This is probably a pretty dumb question but here goes. How do I make a users decimal value display as a percentage later in my program. Say if user was asked for interest rate and they put .05. Later...
  2. Replies
    10
    Views
    1,637

    Re: Help with run time error

    I figured it out. Thanks for your help!
  3. Re: Trying to create a loop for the user to press enter to return to main menu

    when they press enter it should return them to the main menu to press a number again. The main menu method is app.displayMenus();
  4. Re: Trying to create a loop for the user to press enter to return to main menu

    I don't know how to write it though because the else if statement before it confuses me on what to put in the while loops boolean expression
    else if(option == 3)
    {
    while(?)
    {
    ...
  5. Replies
    10
    Views
    1,637

    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...
  6. Replies
    10
    Views
    1,637

    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 /...
  7. Trying to create a loop for the user to press enter to return to main menu

    I am having trouble with returning to the main menu.

    public static void main(String[] args)
    {
    Project4 app = new Project4();

    //Display all Menu options
    app.displayMenus();
    //Asks...
  8. Replies
    10
    Views
    1,637

    Re: Help with run time error

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

    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 *...
  10. Replies
    6
    Views
    1,641

    Re: Help using parameters

    The variables I need are principal, interestRate, numberOfYears, and numberOfTimes, in the main class and they have to go through to Investment class to calculate the value. I want to display them in...
  11. Replies
    6
    Views
    1,641

    Re: Help using parameters

    Do I create my object in the method menu3() or do I have to declare it in the main method?
  12. Replies
    6
    Views
    1,641

    Re: Help using parameters

    All the variables have to go through my other class to be calculated into the futureValue variable. Thats what is confusing me. Here is my other class if that helps.

    //This class calculates...
  13. Replies
    6
    Views
    1,641

    Help using parameters

    Okay, so I have 2 classes (Investment and Project4)
    This program is designed to display 5 menu options.

    The first menu option asks the user for a starting balance and an interest rate
    The second...
Results 1 to 13 of 13