private static Book createBook() throws Exception { String title = ""; String author = ""; while (title.compareTo("") == 0) { System.out.println("\n" + LocaleMessage.getBookTitlePrompt()); title = getInput(); } while (author.compareTo("") == 0) { System.out.println("\n" + LocaleMessage.getAuthorNamePrompt()); author = getInput(); } return new Book(generateBookId(), title, author); }