No idea what to do man, sorry. I might just go skip this assignment.
Type: Posts; User: Amity
No idea what to do man, sorry. I might just go skip this assignment.
No to both of those questions, sorry..
Okay, well I'm not sure what I'm suppose to see.
Doesn't it round down to 0? So it has to be double?
It's stated as a int?
Oh, 0.004 is expected. I'm getting the error and when I println the problem it shows interest as a 0. Why the difference is what I can't figure out. Not sure why it's getting a 0.
Interest is annual interest / 12 is it not?
Your telling me.. It's a debugging exercise trying to determine the payment by doing some equation in the code. Interest is suppose to come from the input you give, I usually put 0.05 when you run...
For annual interest 0.05, which is then divided by 12 or something for interest I think.
We are trying to find the payment you have to make. Interest is suppose to be determined by the annual interest already presented in the questions divided by 12.
I'm kind of confused because the calculations don't occur due to error. I believe you helped answer approx. the same problem where I'm still confused.
...
The calculation is where the problem is I believe. You actually answered the same type of question once, where I think the problem was the same..
...
That is basically the point of the exercise. It's a debugging exercise and I can't figure out how to fix this one completely.
The inputs I used art the following which includes error, shown in output.
run:
What is your first name?
Ames
What is the price of the car? 17500
What is the downpayment? 500
What is the...
I know that interest is appearing as 0.
The interest rate I need is determined by the annual interest in decimal form presented earlier (in first code) instituted into the second code.
...
payment = ((1/interest)-(1/(interest*Math.pow(1+interest,months))))/loanAmt;
That is line 53. It refers back to
interest = (int) ((double)annualInterest / 12);
loanAmt =...
My bad, the error that appeared when compiled and run is:
"Exception in thread "main" java.lang.ArithmeticException: / by zero
at bert.calculatePayment(bert.java:53)
at bert.main(bert.java:38)...
/*
Chapter 3 Debugging Assignment
Programmer: Nicolas
Date: 18 February 2014
Program Name: bert.java
Purpose:
*/
import java.util.Scanner;