public static void main(String[] args) 
    {              
       Loan loan = null;
       try {
            Prompt prompt = new Prompt();
            loan = prompt.promptForLoanInformation();
       } catch (LoanEntryException ex) {
           System.out.println(ex.getMessage());
           System.exit(1);
       }
       
       if (loan != null) {
            // the calculator object that performs the computation during the 
            // loan period. It uses a chain of computation components.
            Calculator calculator = new Calculator();

            // amortization, scheduled payments for each month
            List<Payment> payments = 
                    calculator.getPayments(loan.getPrinciple().doubleValue()
                            , loan.getAnnualPercentageRage()
                            , loan.getTermYear());
            
           if (payments != null && payments.size() > 0) {
               AmortizerPrinter.print(payments, calculator.getTotalPayments()
                       , calculator.getTotalInterestPayments());
           }
       }

    }