TRENDING NEWS

POPULAR NEWS

Loan Amortization Table Java Program

Display the loan amortization schedule.........?

The monthly payment for a given loan pays the principal and the interest. The formula to compute the monthly payment is as follows: Monthly_pay=(loanAmount * monthlyInterestRate) / (1-1 / (1 + monthlyInterestRate) ^numOfYears*12

The monthly interest is computed by multiplying the monthly interest rate and the balance (the remaining principal). The principal paid for the month is therefore the monthly payment minus the monthly interest. Write a program that lets the user enter the loan amount, the number of years, and the interest rate, and displays the amortization schedule for the loan.

Suppose you enter the loan amount for 10000 for one year with an interest rate of 7%, display a table below:

http://i48.tinypic.com/2nk5kzt.jpg

NOTE:

a. Use the GUI interface to input the values and display the table on the monitor. Must import javax.swing.JOptionPane

b. Also use Math class to compute the power of a number.

c. Use DecimalFormat class to reduce the decimal to two places. Must use import java.text.*.

Java Financial Application?

In the program I have to do this
Suppose you put $10,000 into a CD with an annual percentage yield of 5.75%. After one month, the CD is worth

10000 + 10000 * 5.75/1200 = 10047.91

After two months, the CD is worth

10047.91 + 10047.91 * 5.75 / 1200 = 10096.06

After three months, the CD is worth

10096.06 + 10096.06 * 5.75/1200 = 10144.43

and so on.

Write a program that prompts the user to enter an amount(e.g. 10000), the annual percentage yield(e.g. 5.75) and the number of months (e.g., 18) and displays a table as shown in the sample run on page 152.


The pseudo code for this assignment goes as follows:

Welcome the user to the program or something.
Ask the user to input a CD amount
Ask the user to input an annual percentage yield
Ask the user for the number of months they would like to calculate.

print "Month CD Value"
double calculation = CD amount;
begin loop(for the amount of months asked for)[you can use a FOR or a WHILE loop]

Do the calculation:calculation = calculation + calculation * annual percentage/1200

print "current month " + calculation


end loop after last month is reached

I have Scanner input = new Scanner(System.in);


//deposit
System.out.print("Enter the initial depost amount: ");
double calculation = input.nextDouble();

//percent
System.out.print("Enter annual percentage yield: ");
double percent = input.nextDouble();

//months
System.out.print("Enter maturity period (number of months): ");
double month = input.nextInt();

//Calculations for 1 month

double monthly = (calculation + calculation * percent/1200 );




//Display Month & CDValue Heading
System.out.print("\n");
System.out.print("Month" + " " + " CD Value" + "\n");




//Starting month 1 to whatever user month input is
for (int i = 1; i != month + 1; i++ ){
System.out.println( " " + i + " " + (monthly));

so far....

How do I make the loop add on to each month?
ex: 10047.91 1 month, 10096.06 2nd month, 10144.43 3rd month???

Java Mortgage calculator help.?

import java.util.Scanner;

class MortgageCalculator2 {

public MortgageCalculator2() {
intro();
}

public void mess(String s) {
System.out.printf("%s%n", s);
}

public void messIn(String s) {
System.out.printf("%s > ", s);
}

public void intro() {
Scanner sc = new Scanner(System.in);
boolean run = true;

mess("----------------------------------...
mess("Mort Especi\u00e2l Waresofto");
mess("if we can't float the loan, the gov't will");
mess("----------------------------------...
while (run) {
String[] args = new String[3];
messIn("enter Principal Amount: ");
args[0] = sc.nextLine();
messIn("enter Note Period (Years)");
args[1] = sc.nextLine();
messIn("enter APR example: 9.55");
args[2] = sc.nextLine();
String pmt = calculation(args);
mess("\n");
mess(pmt);
mess("do another one?");
if (sc.nextLine().
equalsIgnoreCase("q")) {
run = false;
}
}
}

public static void main(String[] args) throws Exception {
new MortgageCalculator2();

}

private String calculation(String[] args) {
float pv = Float.valueOf(args[0]);
int term = Integer.valueOf(args[1]);
float apr = Float.valueOf(args[2]);
// double ir = apr / 100 / 12;
double ir = apr / 12 ;
double np = term *12;
System.out.printf("interest monthly: %2.2f%%", ir);
double payNum = (pv * ir) / ( 1 - (1+ir)-np);
return String.format( "Monthly Payment: $%6.2f",payNum);
}
}

I don't have faith in the teacher's formula. This is not how I would do a mortgage program. But, maybe this will get you going.

What are some good apps for learning programming?

None.As other answers have mentioned, Google will help you the most. As of right now, there are no apps that serve as comprehensive solutions to learning programming. Most apps exist for practice, as writing actual code on a phone is very difficult.http://www.google.comSeriously. All you have to type is “[insert language you want to learn here] tutorial for beginners” and watch/read away. Be prepared to install various necessary software/tools (most are free).Also, if you are able to afford a smartphone or computer (especially an Apple device), I suppose you are also able to afford a book for any programming language you wish to learn. Books are best, along with online video tutorials where the narrator explains each step of the programming process.Many amazing books and videos exist, and I will link them belowFor object-oriented programming, I recommend starting with:C#Book: RB Whitaker: 9780985580124: Amazon.com: BooksYoutube: C# Fundamentals for Absolute Beginners - MVA (2016)JavaBook: A Beginner's Guide, Sixth Edition: Herbert Schildt: 9780071809252: Amazon.com: BooksYouTube: Java Tutorial For Beginners (Step by Step tutorial)PythonBook: Learning Python: Powerful Object-Oriented Programming 5, Mark Lutz, eBookYouTube: Python 3.4 Programming TutorialsFor web development, I recommend starting with:JavaScript and HTMLBook for Javascript: JavaScript: The Definitive Guide: Activate Your Web Pages (Definitive Guides) eBook: David Flanagan: Kindle StoreYouTube for JavaScript: JavaScript TutorialsComprehensive resource for HTML: W3Schools Online Web TutorialsEDIT: Lynda: Online Courses, Class, Training, Tutorials offers good tutorials (for basically everything) as well; in fact, I’ve used them before. They are quite pricey though.

JAVA INTEREST CALCULATOR HELP!?

Here's a similar calculator program that could help you: http://stackoverflow.com/questions/13316652/java-bank-interest-savings-calculator

Java Help, Running totals not working?

can someone tell me what is wrong with my code?

when the loan amortization table prints, it doesn't keep a running total of the interest paid, and for some reason it makes the user pay one more payment than they should.

thanks... here is my code:

/*
A program that creates a loan amortization table using the values for
Initial Loan Principal, Annual Percentage Rate, and Monthly Payment
supplied by the user.
Rebecca
Created using jGrasp
CS 1337
*/

import java.util.Scanner; //needed to accept information from the user
import java.text.DecimalFormat; //needed to format the decimals

public class AmortizationTable
{
public static void main (String[] args)
{
Scanner keyboard = new Scanner (System.in); //Create Scanner

System.out.println("Welcome to the Loan Payment Calculator.\n");

//Get loan amount from the user
System.out.print("Please enter the Initial Loan Principal: ");
double initialAmt = keyboard.nextDouble();
//Get the interest rate from the user
System.out.print("Please enter the Annual Percentage Rate: ");
double APR = keyboard.nextDouble();
//Get the payment amount from the user
System.out.print("Please enter the Monthly Payment Amount: ");
double monthPmt = keyboard.nextDouble();

System.out.print("Month\tPayment\t\tIn... Paid\t");
System.out.println("Remaining Principal\tTotal Interest Paid");

int month = 0;
int pmtNumber = 0;

double remPrinc;

do
{

DecimalFormat formatter = new DecimalFormat("0.00");

remPrinc = initialAmt - (monthPmt * pmtNumber++);
double intrst = (remPrinc * (APR/100)) / 12;
double intPdSoFar =+ intrst;
double principal =+ (monthPmt - intrst);
double princ =+ principal;

System.out.print(month++);
System.out.print("\t\t");
System.out.print(formatter.format(mont...
System.out.print("\t\t");
System.out.print(formatter.format(intr...
System.out.print("\t\t");
System.out.print(formatter.format(prin...
System.out.print("\t\t");
System.out.print(formatter.format(remP...
System.out.print("\t\t\t");
System.out.println(formatter.format(in...

}while (remPrinc > 0);

}

}

TRENDING NEWS