import javax.swing.JOptionPane; public class PaymentCalculatorTest { public static void main(String[] args) { // local vars (NOTE: initial values necessary only to make // unfinished program compile and run!) int amountBorrowed = 0; double interestRate = 0.0; int years = 0; // TO DO: Exercise 4 - insert statements to do input here // ====================================================== // create PaymentCalculator object using input values PaymentCalculator myCalc = new PaymentCalculator (amountBorrowed, interestRate, years); // print loan data System.out.println(myCalc.toString()); // get equal monthly payment amount double payment = myCalc.computeMonthlyPayment(); // print payment amount System.out.println("Monthly Payment: $" + payment + "\n"); // get and print total payments double totalPayments = myCalc.computeTotalPayments() ; System.out.println("Total payments: $" + totalPayments + "\n"); // TO DO: Exercise 6 - insert statements here // ========================================== System.exit(0) ; // Bye-bye! } }