Search:

Type: Posts; User: Norm

Search: Search took 0.11 seconds.

  1. Thread: Method Help

    by Norm
    Replies
    17
    Views
    1,067

    Re: Method Help

    Did you read the tutorial at the link I posted about how to pass args to a method?

    The method: getCalculationType() should do only what its name says: get a type and return it to the caller. I...
  2. Thread: Method Help

    by Norm
    Replies
    17
    Views
    1,067

    Re: Method Help

    Do the other methods get the user's input passed to them as arguments?
    See the tutorial on how to pass args: Passing Information to a Method or a Constructor (The Java™ Tutorials > Learning the Java...
  3. Thread: Method Help

    by Norm
    Replies
    17
    Views
    1,067

    Re: Method Help

    Ok.
  4. Thread: Method Help

    by Norm
    Replies
    17
    Views
    1,067

    Re: Method Help

    switch statements can be used for choosing what method to call based on the value in variable.
  5. Thread: Method Help

    by Norm
    Replies
    17
    Views
    1,067

    Re: Method Help

    Copy the definition for the variable: input from the main() method to the method. This is where input is defined:

    Scanner input = new Scanner(System.in);


    I'm done for tonight.
  6. Thread: Method Help

    by Norm
    Replies
    17
    Views
    1,067

    Re: Method Help

    When you get compiler errors, please copy the full text of the error messages and paste it here.

    The compiler can't find a definition for the variable: input. One solution is to copy its...
  7. Thread: Method Help

    by Norm
    Replies
    17
    Views
    1,067

    Re: Method Help

    The method should use statement just like I posted except with the names of variables that are in the method.
    Don't use the names from the main() method.
  8. Thread: Method Help

    by Norm
    Replies
    17
    Views
    1,067

    Re: Method Help

    The following statements from your posted code does that:


    System.out.print("Enter Loan Amount: "); // ask the user to enter data
    double principle = input.nextInt(); // read the...
Results 1 to 8 of 8