public static String getLastName() {
        Scanner sc = new Scanner(System.in);
        String lastName;
        
        try {
            // asks user to input customer last name
            System.out.print(" Customer last name: ");
            lastName = sc.next();

            // validates last name input
            for (int x = 0; x < lastName.length(); x++) {
                if (Character.isDigit(lastName.charAt(x))
                    || !(Character.isLetterOrDigit(lastName.charAt(x)))) {
                    throw (new InputMismatchException("Invalid. Last name " +
                            "contains digits or symbols."));
                }
            }
        } catch (InputMismatchException e) {
            getExceptionMessage("last name", e);
            return getLastName();
        }
        
        return lastName;
    }