private static boolean getUserInput() {
        boolean retValue = true;
        String line = "";

        for (int input = 0; input < userPrompts.length ; ) {
            String userPrompt = userPrompts[input];
            try {
                line = readLine(userPrompt);
            } catch (IOException e) {
                System.out.println("An IOException was encountered. Terminating program.\n");
                return false;
            }

            // Assume a user input mistake
            boolean isValidValue = false;

            try {
                switch (input) {
                    case 0:
                        loanAmount = Double.parseDouble(line);
                        isValidValue = validateAmount(loanAmount);
                        break;

                    case 1:
                        rate = new InterestRate(Double.parseDouble(line));
                        isValidValue = true;
                        break;

                    case 2:
                        duration = new LoanDuration(Integer.parseInt(line));
                        isValidValue = true;
                        break;
                }
            } catch (NumberFormatException e) {
                System.out.println(e.getMessage());
            } catch (IllegalArgumentException e) {
                System.out.println(e.getMessage());
            }

            if (isValidValue) {
                input++;
            } else {
                System.out.println("An invalid value was entered.\n");
            }
        }

        return retValue;
    }