Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class MediaPlayer {
- public static void main(String[] args) {
- String title, singer, record, name;
- int duration;
- int miliS;
- Scanner s = new Scanner(System.in);
- Playlist p = new Playlist();
- /*
- title = s.nextLine();
- singer = s.nextLine();
- record = s.nextLine();
- duration = s.nextInt();
- */
- p.setPlaylistName("Ecclectic");
- System.out.println("Playlist created called: " + p.getPlaylistName() + ". \n");
- Song a = new Song("Back In Black","AC/DC","AC/DC LIVE",360000);
- p.add(a);
- Song b = new Song("Shoot to Thrill","AC/DC","AC/DC LIVE",324000);
- p.add(b);
- Song c = new Song("When You Die","No Innocent Victim","No Compromise",150000);
- p.add(c);
- Song d = new Song("Fukaki Umi No Kanata - Yo","Yoshida Brothers","Putumayo - Asian Lounge",306000);
- p.add(d);
- p.print();
- miliS = p.totalTime();
- System.out.println(miliS);
- System.out.println(p.formattedTotalTime(miliS));
- name = "Back In Black";
- System.out.println(p.size());
- //p.removeSong(name);
- System.out.println(name);
- p.clear();
- p.print();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement