develop #1
@@ -21,14 +21,25 @@ public class Main {
|
||||
break;
|
||||
|
||||
case 2:
|
||||
// TODO: Get genre ID and page from user, then call movieService.displayMoviesByGenre()
|
||||
|
||||
long id = getLongInput("Enter genre ID: ");
|
||||
long page = getLongInput("Enter page number: ");
|
||||
movieService.displayMoviesByGenre(id, page);
|
||||
break;
|
||||
|
||||
|
||||
case 3:
|
||||
// TODO (BONUS): Get movie ID from user, then call movieService.displayMovieDetails()
|
||||
|
||||
System.out.println("Enter movie ID to see details: ");
|
||||
if (scanner.hasNextLong())
|
||||
{
|
||||
Long movieId = scanner.nextLong();
|
||||
System.out.println("---Fetching movie details---");
|
||||
movieService.displayMovieDetails(movieId);
|
||||
}
|
||||
else
|
||||
{
|
||||
System.out.println("Invalid ID.");
|
||||
scanner.next();
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
@@ -45,7 +56,7 @@ public class Main {
|
||||
if (running) {
|
||||
System.out.println("\nPress Enter to continue...");
|
||||
scanner.nextLine();
|
||||
scanner.nextLine();
|
||||
//scanner.nextLine();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user