private void setPrincipleAmount(Loan loan) throws LoanEntryException {
        // Loan pricinple amount
       String principle_str = readPrincipleAmount();
       
       double principle = 0d;
       
       try {
               principle = 
                       (principle_str != null)? 
                       Double.parseDouble(principle_str): 0d;
               
               if (principle <= 0) {
                   throw new LoanEntryException (
                           "loan amount should be greater than zero");
               }
               
               loan.setPrinciple(new BigDecimal(principle));
       } catch (NumberFormatException ex) {
           throw new LoanEntryException (
                   "Please enter a valid loan principle amount.");
       }
    }