Yet another mortgage calculator

Page 1 of 1

2 Replies - 1213 Views - Last Post: 24 November 2008 - 09:32 PMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'http://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=72385&amp;s=c9e694ade7647bf0063ec3e401a21b81&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

#1 bjcerda

Reputation: 0
• Posts: 15
• Joined: 17-November 08

Yet another mortgage calculator

Posted 17 November 2008 - 10:47 PM

Please help me. I'm trying my first mortgage calc. I was thrown into this one because it's the first week of class... yikes

//Jave Coding created by Brandi  11.14.08

//Mortgage Payment Calculator to output

//First requirement_output_payment schedule
//for a 200k loan over a 30 year term at 5.75% interest

//Second requirement_output_payments schedule for same
//add_mortgage payment amount_balance_and interest paid for each payment
//over the term_looping to catch all payments

//Third requirement_output_payments schedule for 7_15_30 year at
//5.35_5.5_5.75 with an array 30 year term

//Varies- Principal, Percentage, Months

//Constants- Equation

//Program Start
import java.io;
import java.text.DecimalFormat;
public class mtg_calc2
{
public static void main(String[]args)

{

double payment, principal, interest, payment_n, A;

principal= 200000.00;   //principal
interest= 0.0575;   //interest
payment_n= 360;   //number of payments

A= (interest*principal*(1+interest));

//title of program

System.out.println("Welcome to the Cerda Mortgage Calculator!");

System.out.println("Based on this information, your payment is: \$"+A);

}
}

My error message upon compiling:
C:\Users\fileDocuments\mtg_calc2.java:28: cannot find symbol
symbol : class io
location: package java
import java.io;
^
1 error

Tool completed with exit code 1

Please tell me what I did wrong to the class?

Is This A Good Question/Topic? 0

Replies To: Yet another mortgage calculator

#2 n8wxs

• --... ...-- -.. . -. ---.. .-- -..- ...

Reputation: 972
• Posts: 3,878
• Joined: 07-January 08

Re: Yet another mortgage calculator

Posted 17 November 2008 - 11:05 PM

Try import java.io.*;

#3 bjcerda

Reputation: 0
• Posts: 15
• Joined: 17-November 08

Re: Yet another mortgage calculator

Posted 24 November 2008 - 09:32 PM

n8wxs, on 17 Nov, 2008 - 10:05 PM, said:

Try import java.io.*;

Thank you! what an oversite