Search:

Type: Posts; User: Amity

Search: Search took 0.24 seconds.

by Amity
Replies
35
Views
425

Re: Programming Exercise Help

No idea what to do man, sorry. I might just go skip this assignment.

by Amity
Replies
35
Views
425

Re: Programming Exercise Help

No to both of those questions, sorry..

by Amity
Replies
35
Views
425

Re: Programming Exercise Help

Okay, well I'm not sure what I'm suppose to see.

by Amity
Replies
35
Views
425

Re: Programming Exercise Help

Doesn't it round down to 0? So it has to be double?

by Amity
Replies
35
Views
425

Re: Programming Exercise Help

It's stated as a int?

by Amity
Replies
35
Views
425

Re: Programming Exercise Help

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.

by Amity
Replies
35
Views
425

Re: Programming Exercise Help

Interest is annual interest / 12 is it not?

by Amity
Replies
35
Views
425

Re: Programming Exercise Help

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...

by Amity
Replies
35
Views
425

Re: Programming Exercise Help

For annual interest 0.05, which is then divided by 12 or something for interest I think.

by Amity
Replies
35
Views
425

Re: Programming Exercise Help

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.

by Amity
Replies
35
Views
425

Re: Programming Exercise Help

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.
...

by Amity
Replies
35
Views
425

Re: Programming Exercise Help

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..
...

by Amity
Replies
35
Views
425

Re: Programming Exercise Help

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.

by Amity
Replies
35
Views
425

Re: Programming Exercise Help

The inputs I used art the following which includes error, shown in output.

run:
Ames
What is the price of the car? 17500
What is the downpayment? 500
What is the...

by Amity
Replies
35
Views
425

Re: Programming Exercise Help

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.

...

by Amity
Replies
35
Views
425

Re: Programming Exercise Help

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 =...

by Amity
Replies
35
Views
425

Re: Programming Exercise Help

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)...

by Amity
Replies
35
Views
425

Programming Exercise Help

/*
Chapter 3 Debugging Assignment
Programmer: Nicolas
Date: 18 February 2014
Program Name: bert.java
Purpose:
*/

import java.util.Scanner;
Results 1 to 18 of 18