Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void subMenuAddMovie()
- {
- System.out.println("\n1. Add ISOImage to collection\n" +
- "2.Add DVD to collection");
- Scanner keyboard = new Scanner(System.in);
- int choice = keyboard.nextInt();
- boolean output = false;
- System.out.println("Now input some information about the movie...");
- System.out.print("Title: ");
- String title = keyboard.nextLine();
- System.out.print("ISBN: ");
- String isbn = keyboard.nextLine();
- System.out.print("Length: ");
- int length = keyboard.nextInt();
- System.out.print("Production year: ");
- int year = keyboard.nextInt();
- System.out.print("Studio name: ");
- String studio = keyboard.nextLine();
- Movie temp = null;
- switch(choice)
- {
- case 1:
- System.out.print("ISOImage size: ");
- float size = keyboard.nextFloat();
- temp = new ISOImage(title, isbn, length, year, new Studio(studio), size);
- break;
- case 2:
- System.out.print("Nr of Discs: ");
- int discs = keyboard.nextInt();
- temp = new DVD(title, isbn, length, year, new Studio(studio), discs);
- break;
- }
- this.myMovies.put(isbn, temp);
- }
Add Comment
Please, Sign In to add comment