diff options
-rw-r--r-- | Album.java | 5 | ||||
-rw-r--r-- | MusicalElement.class | bin | 621 -> 0 bytes | |||
-rw-r--r-- | Playlist.java | 17 |
3 files changed, 20 insertions, 2 deletions
@@ -1,9 +1,11 @@ import java.util.ArrayList; public class Album { + private int id, duration, date; private String title, artist; private ArrayList songs = new ArrayList(); + public Album(int id, String title, int duration, String artist, int date, ArrayList songs) { this.id=id; this.title=title; @@ -16,8 +18,7 @@ public class Album { public int getId(){return id;} public String getTitle(){return title;} public int getDuration(){ - - + //Addition of the duration of the songs inside the album return duration; } diff --git a/MusicalElement.class b/MusicalElement.class Binary files differdeleted file mode 100644 index 2cabec5..0000000 --- a/MusicalElement.class +++ /dev/null diff --git a/Playlist.java b/Playlist.java index e69de29..b79f402 100644 --- a/Playlist.java +++ b/Playlist.java @@ -0,0 +1,17 @@ +import java.util.ArrayList; + +public class Playlist { + + private int id; + private String name; + private ArrayList content = new ArrayList(); + + public Playlist(int id, String name, ArrayList content) { + this.id=id; + this.name=name; + this.content=content; + } + + public int getId(){return id;} + public String getName(){return name;} +} |