aboutsummaryrefslogtreecommitdiff
path: root/Album.java
diff options
context:
space:
mode:
Diffstat (limited to 'Album.java')
-rw-r--r--Album.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/Album.java b/Album.java
index 5035398..1dd193d 100644
--- a/Album.java
+++ b/Album.java
@@ -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();
}
}