public static int getTerm() {
        Scanner sc = new Scanner(System.in);
        
        // asks user to enter loan term, then validates input
        try {
            System.out.print(" Loan term (1, 3, or 5): ");
            return sc.nextInt();
        } catch (InputMismatchException e) {
            getExceptionMessage("loan term", e);
            return getTerm();
        }
    }