public void availableMovies(User user) { String header = String.format("%-20s %-6s %-20s %-5s", "MOVIE", "YEAR", "DIRECTOR", "RATING"); System.out.println("\n" + header); System.out.println("=========================================================="); if (user.isAdminUser() || user.isNormalUser()) { System.out.print(movieSection.listAvailableItems()); } dispatcher.start(Constants.MENU_RUN, user); }
public void availableBooks(User user) { if (user.isAdminUser() || user.isNormalUser()) { String header = String.format("%-20s %-20s %-6s", "BOOK", "AUTHOR", "YEAR"); System.out.println("\n" + header); System.out.println("=================================================="); String result = bookSection.listAvailableItems(); System.out.print(result); } dispatcher.start(Constants.MENU_RUN, user); }