package music;

public class PlaylistDemo {
    public static void main(String[] args) {
        Playlist trip = new Playlist("Viaje");
        trip.add(new Song("Lima gris", "Grupo Garúa", 222));
        trip.add(new Song("Cumbia del puente", "Los Rieleros", 187));
        trip.add(new Song("Vals del Rímac", "Trío Malecón", 238));
        trip.add(new Song("Intro", "Varios", 41));

        IO.println(trip.name() + ": " + trip.size() + " canciones, " + trip.totalSeconds() + " s");
        IO.println("la más larga: " + trip.longest().title());
        Song wanted = new Song("Cumbia del puente", "Los Rieleros", 187);
        IO.println("¿tiene Cumbia del puente? " + trip.contains(wanted));
        IO.println("quitadas por cortas: " + trip.removeShorterThan(60) + ", quedan " + trip.size());

        ArrayPlaylist small = new ArrayPlaylist();
        for (int i = 1; i <= 5; i++) {
            small.add(new Song("Pista " + i, "Varios", 60 * i));
            IO.println("size " + small.size() + ", capacity " + small.capacity());
        }
    }
}
