Welcome to Dream.In.Code
Become a Java Expert!

Join 150,422 Java Programmers for FREE! Get instant access to thousands of Java experts, tutorials, code snippets, and more! There are 1,102 people online right now. Registration is fast and FREE... Join Now!




mortagage calculate

 
Reply to this topicStart new topic

mortagage calculate

andyhage
16 Mar, 2008 - 06:34 AM
Post #1

New D.I.C Head
*

Joined: 16 Mar, 2008
Posts: 1

I need help with my code, I need to write the program in java, mortage calculator
I did some but it is not right, i need help with this code.

7yrs at 5.35%
15yrs at 5.5%
30yrs at 5.75%

1. This program need to display design flow chart to the source code of the program
and use an array for the different loans. display the mortage payment amount for each loan

2. use an array for the different loans. display the mortage payment amount for each loan and then list the loan balance and interest paid for each payment over the term of the loan. use loops to prevent lists from scrolling off the screen.

code
[ // Mortgage Calculator.java

import java.text.POS 407;

public class Mortgage CALCULATOR
public class ANDY
public class
{
public static void main(String args[]) throws Exception
{
//declare and construct variables
int loanAmt = 200000; // principal loan amount
int loanTerm = 30; // loan term
int monthNum = 360; // indicates monthly line item number
int line = 0;
double intRate1 = 5.75; // initial interest rate
double intRate2 = 5.5;
double intRate3 = 5.35;
double monthlyPay = 0; // monthly payment
double monPrinPay; // monthly principal payment
double newLoanBal = 200000; // loan balance
double monIntPaid; // interest paid
double newIntRate = 0; // monthly interest rate

interest = new Array();
interest[0] =(5.75* 200000) / 900;
interest[1] = (5.5* 200000) /450;
interest[2] = (5.35*200000) /210;

// displays in console window
System.out.println();
System.out.println("Welcome to the Mortgage Payment Calculator");
System.out.println();
System.out.println("This program will calculate and display: (0) rate 5.75");
System.out.println(" (1) rate 5.5");
System.out.println(" (2) rate 5.35");
System.out.println("The loan amount = $" + interst[]);
}
}

Attached File  pos_407.jave.txt ( 1.46k ) Number of downloads: 69


This post has been edited by andyhage: 16 Mar, 2008 - 08:54 AM
User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: Mortagage Calculate
16 Mar, 2008 - 07:35 AM
Post #2

using DIC.Core;
Group Icon

Joined: 26 Jul, 2007
Posts: 9,483



Thanked: 161 times
Dream Kudos: 9075
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions
Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.

Post your code like this: code.gif

Thanks smile.gif
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/9/09 08:23PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Java Help!

Java Tutorials

Reference Sheets

Java Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month