I'm continuing to try and solve the problem on my own but if any people have tips I would appreciate it.... Focus on the generateLoanTable() method because everything else is good. When I run the program in my main method (not included) it shows the loan amount entered multiplied by the rate (not as a percentage) and year number instead of the total payment for the loan period and rate associated in the table. Also, I don't know the code to put in to highlight reserved words on the thread posts so if I could get that info too that would help
import java.text.*; class Loan { //--------------------- //DATA MEMBERS //---------------------- private final int MONTHS_IN_YEAR = 12; private double loanAmount; private double monthlyInterestRate; private int numberOfPayments; private static final int BEGIN_YEAR = 5; private static final int END_YEAR = 30; private static final int YEAR_INCR = 5; private static final double BEGIN_RATE = 6.0; private static final double END_RATE = 10.0; private static final double RATE_INCR = 0.25; //Constructor public Loan(double amount, double rate, int period) { setAmount(amount); setRate(rate); setPeriod(period); } //Returns the loan amount public double getAmount() { return loanAmount; } //Returns the loan period in number of years public int getPeriod() { return numberOfPayments / MONTHS_IN_YEAR; } //Returns the loan's annual interest rate public double getRate() { return monthlyInterestRate * 100.0 * MONTHS_IN_YEAR; } //Returns the loan's monthly payment amount public double getMonthlyPayment() { double monthlyPayment; monthlyPayment = (loanAmount * monthlyInterestRate) / (1 - Math.pow(1/(1 + monthlyInterestRate), numberOfPayments)); return monthlyPayment; } //Returns the total payment amount for the loan public double getTotalPayment() { double totalPayment; totalPayment = getMonthlyPayment() * numberOfPayments; return totalPayment; } //Generates loan table public void generateLoanTable(double loanAmt) { DecimalFormat df = new DecimalFormat("0.00"); System.out.print("\t"); for(int colLabel = 5; colLabel <= 30; colLabel += 5){ System.out.format("%11d", colLabel); } System.out.println("\n"); for(double rate = BEGIN_RATE; rate <= END_RATE; rate += RATE_INCR){ System.out.print(df.format(rate) + "% "); for(int year = BEGIN_YEAR; year <= END_YEAR; year += YEAR_INCR){ loanAmt = getAmount() * rate * year; System.out.print(" " + df.format(loanAmt)); } System.out.println(); } System.out.println(); } //Sets the loan amount public void setAmount(double amount) { loanAmount = amount; } //Sets the annual interest rate public void setRate(double annualRate) { monthlyInterestRate = annualRate / 100.0 / MONTHS_IN_YEAR; } //Sets the loan period public void setPeriod(int periodInYears) { numberOfPayments = periodInYears * MONTHS_IN_YEAR; } }