diff options
Diffstat (limited to 'Album.java')
-rw-r--r-- | Album.java | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -35,8 +35,12 @@ public class Album implements Serializable { public void setArtist(){this.artist=artist;} public void setDate(){this.date=date;} + public void addSong(Song song){ + this.songs.add(song); + } + public String toString() { - return "Id : "+getId()+"\nTitle : "+getTitle()+"\nDuration : "+getDuration()+"\nArtist : "+getArtist()+"\nDate of release : "+getDate()+"\nSongs : "+getSongs(); + return "Id : "+getId()+"\nTitle : "+getTitle()+"\nDuration : "+getDuration()+"\nArtist : "+getArtist()+"\nDate of release : "+getDate(); } } |