That statement could be coded in any method that is in the same class as the computePayment() method.
Then you need to have a statement that calls the method you want to execute and pass it...
Type: Posts; User: Norm
That statement could be coded in any method that is in the same class as the computePayment() method.
Then you need to have a statement that calls the method you want to execute and pass it...
When a method returns a value, the calling code needs to assign the returned value to a variable:
double someVar = computePayment(put needed args here);
someVar now has the value that was...
Are the methods you want to execute being called? If they are not called, they will not be executed.
Take a look at the tutorial:
Passing Information to a Method or a Constructor (The Java™...
Can you explain what the program does and what is "going wrong"?
What do you expect to happen when the code executes?
Please explain what the problem is.