From b3ed778f6452211bc4070ba7644ea3247ad8f234 Mon Sep 17 00:00:00 2001 From: Clyhtsuriva Date: Mon, 28 Dec 2020 12:39:16 +0100 Subject: Repairing playlist An error occured when no playlists were found AND we wanted to create one. Also populated the objects files to meet the specs of the teach. Creating a run command, might delete later.. --- Playlist.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'Playlist.java') diff --git a/Playlist.java b/Playlist.java index 990aa26..8374c77 100644 --- a/Playlist.java +++ b/Playlist.java @@ -17,8 +17,17 @@ public class Playlist implements Serializable { public int getId(){return id;} public String getName(){return name.toUpperCase();} //using toUpperCase method because the way I sort by name sort he upper case then the lower case, which is inconvenient. - public ArrayList getSongs(){return songs;} - public ArrayList getAudioBooks(){return audiobooks;} + public void getSongs(){ + for ( Song s : songs ){ + System.out.println(s); + } + } + public void getAudioBooks(){ + for (AudioBook b : audiobooks ){ + System.out.println(b); + } + + } public void setId(int id){this.id=id;} public void setName(){this.name=name;} -- cgit v1.2.3