From 863d326bd146fb08d9b8c6de03bde0e83f61c74a Mon Sep 17 00:00:00 2001 From: Masfehico Date: Mon, 7 Dec 2020 15:05:37 +0100 Subject: cleaning and adding stuff in playlist --- Album.java | 5 +++-- MusicalElement.class | Bin 621 -> 0 bytes Playlist.java | 17 +++++++++++++++++ 3 files changed, 20 insertions(+), 2 deletions(-) delete mode 100644 MusicalElement.class diff --git a/Album.java b/Album.java index b48cf8e..8c7b809 100644 --- a/Album.java +++ b/Album.java @@ -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 deleted file mode 100644 index 2cabec5..0000000 Binary files a/MusicalElement.class and /dev/null differ 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;} +} -- cgit v1.2.3