Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2014
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3.  
  4. public class MediaPlayer {
  5.  
  6. public static void main(String[] args) {
  7.  
  8. String title, singer, record, name;
  9. int duration;
  10.  
  11. int miliS;
  12.  
  13. Scanner s = new Scanner(System.in);
  14.  
  15. Playlist p = new Playlist();
  16. /*
  17. title = s.nextLine();
  18. singer = s.nextLine();
  19. record = s.nextLine();
  20. duration = s.nextInt();
  21. */
  22.  
  23. p.setPlaylistName("Ecclectic");
  24.  
  25. System.out.println("Playlist created called: " + p.getPlaylistName() + ". \n");
  26.  
  27. Song a = new Song("Back In Black","AC/DC","AC/DC LIVE",360000);
  28. p.add(a);
  29. Song b = new Song("Shoot to Thrill","AC/DC","AC/DC LIVE",324000);
  30. p.add(b);
  31. Song c = new Song("When You Die","No Innocent Victim","No Compromise",150000);
  32. p.add(c);
  33. Song d = new Song("Fukaki Umi No Kanata - Yo","Yoshida Brothers","Putumayo - Asian Lounge",306000);
  34. p.add(d);
  35. p.print();
  36.  
  37. miliS = p.totalTime();
  38. System.out.println(miliS);
  39. System.out.println(p.formattedTotalTime(miliS));
  40.  
  41. name = "Back In Black";
  42.  
  43. System.out.println(p.size());
  44.  
  45. //p.removeSong(name);
  46. System.out.println(name);
  47.  
  48. p.clear();
  49.  
  50. p.print();
  51. }
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement